20 references to ERR_ProtectedInExtension
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\AccessCheck.cs (1)
699
return containingType.IsExtension ? ErrorCode.
ERR_ProtectedInExtension
Errors\ErrorFacts.cs (1)
2513
or ErrorCode.
ERR_ProtectedInExtension
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (18)
Semantics\ExtensionTests.cs (18)
41815
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 24),
41818
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 23),
41821
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 35),
41824
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 45),
41830
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 23),
41836
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 51));
41860
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 33),
41863
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 32),
41866
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 44),
41869
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 54),
41875
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 32),
41881
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 60));
41905
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 32),
41908
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 31),
41911
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 43),
41914
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 53),
41920
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 31),
41926
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 59));