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)
43881
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 24),
43884
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 23),
43887
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 35),
43890
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 45),
43896
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 23),
43902
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 51));
43926
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 33),
43929
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 32),
43932
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 44),
43935
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 54),
43941
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 32),
43947
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 60));
43971
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "M").WithArguments("E.extension(int).M()").WithLocation(5, 32),
43974
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "P").WithArguments("E.extension(int).P").WithLocation(6, 31),
43977
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).P2.get").WithLocation(7, 43),
43980
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "set").WithArguments("E.extension(int).P3.set").WithLocation(8, 53),
43986
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "this").WithArguments("E.extension(int).this[int]").WithLocation(9, 31),
43992
Diagnostic(ErrorCode.
ERR_ProtectedInExtension
, "get").WithArguments("E.extension(int).this[int, int].get").WithLocation(10, 59));