72 references to ERR_RefReadonlyNotField
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3675
ErrorCode.
ERR_RefReadonlyNotField
,
Errors\ErrorFacts.cs (1)
1853
or ErrorCode.
ERR_RefReadonlyNotField
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenInParametersTests.cs (1)
1241
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)
1383
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(12, 9),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (19)
RefReadonlyParameterTests.cs (11)
791
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 52),
2573
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2655
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2744
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(5, 16));
2806
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(6, 17),
2812
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(8, 17),
2818
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(11, 17),
2824
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(13, 17));
2909
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "M1()").WithArguments("method", "M1").WithLocation(9, 16),
2912
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "M1()").WithArguments("method", "M1").WithLocation(10, 16));
2954
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "p").WithArguments("variable", "p").WithLocation(18, 25),
Semantics\ExtensionTests2.cs (4)
1072
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(8, 13),
1075
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(9, 26)
1131
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(8, 9),
1134
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "i").WithArguments("variable", "i").WithLocation(9, 18)
Semantics\InlineArrayTests.cs (4)
9447
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "c.F[0]").WithArguments("method", "this.get").WithLocation(23, 23)
9801
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F[0]").WithArguments("method", "this.get").WithLocation(15, 23)
10762
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "c.F[0]").WithArguments("method", "this.get").WithLocation(24, 23)
11042
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)
11523
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(13, 10),
11532
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)
7733
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(12, 73),
7736
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(14, 73),
7739
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(17, 75),
7742
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(19, 75),
7745
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(22, 88),
7748
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(24, 88),
7751
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.RefReadonly").WithArguments("field", "RefReadonly").WithLocation(27, 73),
7754
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.ReadonlyRefReadonly").WithArguments("field", "ReadonlyRefReadonly").WithLocation(29, 73));
8071
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(8, 16),
8074
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(9, 16),
8077
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(18, 20),
8080
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(19, 20),
8083
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(27, 16),
8086
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(28, 16));
8177
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(8, 16),
8180
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(9, 16),
8183
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(18, 20),
8186
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(19, 20),
8189
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(27, 16),
8192
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "F").WithArguments("field", "F").WithLocation(28, 16));
8289
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(14, 49),
8292
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(15, 49),
8295
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(20, 51),
8298
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(21, 51),
8301
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(26, 64),
8304
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(27, 64),
8307
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(32, 49),
8310
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(33, 49));
8407
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(14, 49),
8410
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(15, 49),
8413
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(20, 51),
8416
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(21, 51),
8419
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(26, 64),
8422
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(27, 64),
8425
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(32, 49),
8428
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "s.F").WithArguments("field", "F").WithLocation(33, 49));
31458
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetS().F1").WithArguments("field", "F1").WithLocation(11, 15)
31531
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetS().F1").WithArguments("field", "F1").WithLocation(11, 15)
32084
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetValue().F").WithArguments("field", "F").WithLocation(11, 15));
32137
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "GetValue().F").WithArguments("field", "F").WithLocation(11, 15));
Semantics\RefLocalsAndReturnsTests.cs (4)
426
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "x").WithArguments("variable", "x").WithLocation(6, 30));
1547
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "y").WithArguments("variable", "y").WithLocation(9, 19),
1596
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "L2()").WithArguments("method", "L2").WithLocation(17, 15));
1618
Diagnostic(ErrorCode.
ERR_RefReadonlyNotField
, "L()").WithArguments("method", "L").WithLocation(8, 25),