17 references to ERR_StaticMemberCantBeReadOnly
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (1)
1996
or ErrorCode.
ERR_StaticMemberCantBeReadOnly
Symbols\Source\SourceEventSymbol.cs (1)
595
diagnostics.Add(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, location, this);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
898
diagnostics.Add(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, location, this);
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
556
diagnostics.Add(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, location, this);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1091
diagnostics.Add(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, location, this);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
FieldKeywordTests.cs (6)
4933
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "P1").WithArguments("S.P1").WithLocation(3, 28),
4936
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "Q1").WithArguments("S.Q1").WithLocation(4, 28),
4939
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "Q2").WithArguments("S.Q2").WithLocation(5, 28),
4942
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "Q4").WithArguments("S.Q4").WithLocation(6, 28),
4945
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "get").WithArguments("S.Q6.get").WithLocation(7, 33),
4948
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "set").WithArguments("S.Q8.set").WithLocation(8, 38));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ReadOnlyStructsTests.cs (6)
1456
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "M").WithArguments("S.M()").WithLocation(5, 32));
1507
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "get").WithArguments("S.P.get").WithLocation(7, 18));
1524
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "P").WithArguments("S.P").WithLocation(5, 32));
1729
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "P1").WithArguments("S.P1").WithLocation(4, 32),
1732
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "get").WithArguments("S.P2.get").WithLocation(5, 37));
2291
Diagnostic(ErrorCode.
ERR_StaticMemberCantBeReadOnly
, "E").WithArguments("S1.E").WithLocation(6, 52));