25 references to ERR_AssignReadonlyNotField2
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
2876
ErrorCode.
ERR_AssignReadonlyNotField2
,
Errors\ErrorFacts.cs (1)
1789
case ErrorCode.
ERR_AssignReadonlyNotField2
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenInParametersTests.cs (3)
1134
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "arg2.Alice").WithArguments("variable", "arg2").WithLocation(7, 9),
1140
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "arg2.Alice").WithArguments("variable", "arg2").WithLocation(10, 9),
1146
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)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\PrimaryConstructorTests.cs (1)
14216
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "x.F").WithArguments("variable", "x").WithLocation(7, 9),
Semantics\RefFieldTests.cs (13)
6760
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(24, 61),
6763
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(25, 61),
6766
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(26, 77),
6769
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(27, 61));
6880
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(24, 61),
6883
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(25, 61),
6886
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(26, 77),
6889
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "sIn.F").WithArguments("variable", "sIn").WithLocation(27, 61));
28521
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "s1.RefField").WithArguments("variable", "s1").WithLocation(22, 9),
28530
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "s1.RefField").WithArguments("variable", "s1").WithLocation(37, 9),
28799
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference1(ref s1).RefField").WithArguments("method", "GetReadonlyReference1").WithLocation(12, 9),
28802
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference2(in s1).RefField").WithArguments("method", "GetReadonlyReference2").WithLocation(13, 9),
28805
Diagnostic(ErrorCode.
ERR_AssignReadonlyNotField2
, "GetReadonlyReference3(out s1).RefField").WithArguments("method", "GetReadonlyReference3").WithLocation(14, 9));