30 references to ERR_AssignReadonlyNotField2
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3388
ErrorCode.
ERR_AssignReadonlyNotField2
,
Errors\ErrorFacts.cs (1)
1849
or ErrorCode.
ERR_AssignReadonlyNotField2
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenForEachTests.cs (1)
5495
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "r.V.F").WithArguments("field", "V").WithLocation(7, 5));
CodeGen\CodeGenInParametersTests.cs (3)
1164
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "arg2.Alice").WithArguments("variable", "arg2").WithLocation(7, 9),
1170
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "arg2.Alice").WithArguments("variable", "arg2").WithLocation(10, 9),
1176
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "arg2.Alice").WithArguments("variable", "arg2").WithLocation(13, 9));
CodeGen\CodeGenRefReadonlyReturnTests.cs (6)
549
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "M1().Alice").WithArguments("method", "M1").WithLocation(7, 9),
555
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "M1().Alice").WithArguments("method", "M1").WithLocation(10, 9),
561
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "M1().Alice").WithArguments("method", "M1").WithLocation(13, 9)
595
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "P1.Alice").WithArguments("property", "P1").WithLocation(7, 9),
601
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "P1.Alice").WithArguments("property", "P1").WithLocation(10, 9),
607
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "P1.Alice").WithArguments("property", "P1").WithLocation(13, 9)
CodeGen\CodeGenUsingStatementTests.cs (1)
3273
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "d.V.F").WithArguments("field", "V").WithLocation(7, 5));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\InlineArrayTests.cs (1)
18954
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "x.F").WithArguments("variable", "x").WithLocation(11, 31)
Semantics\PrimaryConstructorTests.cs (1)
15234
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "x.F").WithArguments("variable", "x").WithLocation(7, 9),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\QueryTests.cs (1)
4740
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "r.V.F").WithArguments("field", "V").WithLocation(6, 12));
Semantics\RefEscapingTests.cs (1)
11535
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "rs.Span").WithArguments("variable", "rs").WithLocation(18, 9));
Semantics\RefFieldTests.cs (13)
7214
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(24, 61),
7217
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(25, 61),
7220
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(26, 77),
7223
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(27, 61));
7334
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(24, 61),
7337
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(25, 61),
7340
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(26, 77),
7343
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(27, 61));
29876
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "s1.RefField").WithArguments("variable", "s1").WithLocation(22, 9),
29885
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "s1.RefField").WithArguments("variable", "s1").WithLocation(37, 9),
30160
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference1(ref s1).RefField").WithArguments("method", "GetReadonlyReference1").WithLocation(12, 9),
30163
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference2(in s1).RefField").WithArguments("method", "GetReadonlyReference2").WithLocation(13, 9),
30166
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference3(out s1).RefField").WithArguments("method", "GetReadonlyReference3").WithLocation(14, 9),