72 references to ERR_RefReadonlyNotField
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3384
ErrorCode.
ERR_RefReadonlyNotField
,
Errors\ErrorFacts.cs (1)
1846
or ErrorCode.
ERR_RefReadonlyNotField
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenInParametersTests.cs (1)
1238
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "arg1").WithArguments("variable", "arg1").WithLocation(6, 25),
CodeGen\CodeGenRefReadonlyReturnTests.cs (2)
636
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "M()").WithArguments("method", "M").WithLocation(6, 25),
642
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "P").WithArguments("property", "P").WithLocation(8, 26),
Emit\CompilationEmitTests.cs (1)
1381
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(12, 9),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (19)
RefReadonlyParameterTests.cs (11)
767
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 52),
2564
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2646
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2735
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2797
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(6, 17),
2803
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(8, 17),
2809
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(11, 17),
2815
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(13, 17));
2900
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "M1()").WithArguments("method", "M1").WithLocation(9, 16),
2903
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "M1()").WithArguments("method", "M1").WithLocation(10, 16));
2945
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(18, 25),
Semantics\ExtensionTests2.cs (4)
915
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(8, 13),
918
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(9, 26)
974
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(8, 9),
977
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(9, 18)
Semantics\InlineArrayTests.cs (4)
9396
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "c.F[0]").WithArguments("method", "this.get").WithLocation(23, 23)
9750
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F[0]").WithArguments("method", "this.get").WithLocation(15, 23)
10711
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "c.F[0]").WithArguments("method", "this.get").WithLocation(24, 23)
10991
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "c.F[0][0]").WithArguments("method", "this.get").WithLocation(24, 23)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (47)
Semantics\OverloadResolutionTests.cs (2)
11526
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(13, 10),
11535
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(13, 10),
Semantics\RefExtensionMethodsTests.cs (1)
2129
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(6, 17));
Semantics\RefFieldTests.cs (40)
7661
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(12, 73),
7664
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(14, 73),
7667
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(17, 75),
7670
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(19, 75),
7673
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(22, 88),
7676
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(24, 88),
7679
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(27, 73),
7682
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(29, 73));
7999
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(8, 16),
8002
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(9, 16),
8005
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(18, 20),
8008
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(19, 20),
8011
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(27, 16),
8014
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(28, 16));
8105
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(8, 16),
8108
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(9, 16),
8111
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(18, 20),
8114
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(19, 20),
8117
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(27, 16),
8120
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(28, 16));
8217
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(14, 49),
8220
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(15, 49),
8223
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(20, 51),
8226
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(21, 51),
8229
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(26, 64),
8232
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(27, 64),
8235
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(32, 49),
8238
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(33, 49));
8335
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(14, 49),
8338
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(15, 49),
8341
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(20, 51),
8344
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(21, 51),
8347
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(26, 64),
8350
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(27, 64),
8353
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(32, 49),
8356
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(33, 49));
31232
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetS().F1").WithArguments("field", "F1").WithLocation(11, 15)
31305
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetS().F1").WithArguments("field", "F1").WithLocation(11, 15)
31858
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetValue().F").WithArguments("field", "F").WithLocation(11, 15));
31911
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetValue().F").WithArguments("field", "F").WithLocation(11, 15));
Semantics\RefLocalsAndReturnsTests.cs (4)
429
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "x").WithArguments("variable", "x").WithLocation(6, 30));
1550
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(9, 19),
1599
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "L2()").WithArguments("method", "L2").WithLocation(17, 15));
1621
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "L()").WithArguments("method", "L").WithLocation(8, 25),