22 references to ERR_ProtectedInStruct
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\AccessCheck.cs (1)
700
: containingType.TypeKind == TypeKind.Struct ? ErrorCode.
ERR_ProtectedInStruct
Errors\ErrorFacts.cs (1)
1028
or ErrorCode.
ERR_ProtectedInStruct
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
PrivateProtected.cs (2)
301
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "Field1").WithArguments("Struct.Field1").WithLocation(3, 27)
364
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "Inner").WithArguments("Struct.Inner").WithLocation(23, 29),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\RecordStructTests.cs (3)
781
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "Property").WithArguments("S.Property").WithLocation(4, 19),
784
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "field").WithArguments("S.field").WithLocation(5, 31),
4319
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "Equals").WithArguments("A.Equals(A)").WithLocation(4, 11 + accessibility.Length),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Symbols\SymbolErrorTests.cs (15)
12124
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "field").WithArguments("NS.S1<T, V>.field"),
12127
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "P").WithArguments("NS.S1<T, V>.P"),
12130
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "E").WithArguments("NS.S1<T, V>.E"),
12133
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "M").WithArguments("NS.S1<T, V>.M(T, V)"),
12136
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "Q").WithArguments("NS.S1<T, V>.S2.Q"),
12139
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "E").WithArguments("NS.S1<T, V>.S2.E"),
12142
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "M1").WithArguments("NS.S1<T, V>.S2.M1<X>(X)"),
12145
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "M2").WithArguments("NS.S1<T, V>.S2.M2<X, R>(ref X, R)"),
12172
new ErrorDescription { Code = (int)ErrorCode.
ERR_ProtectedInStruct
, Line = 3, Column = 22 },
12173
new ErrorDescription { Code = (int)ErrorCode.
ERR_ProtectedInStruct
, Line = 4, Column = 35 },
12174
new ErrorDescription { Code = (int)ErrorCode.
ERR_ProtectedInStruct
, Line = 8, Column = 26 },
12175
new ErrorDescription { Code = (int)ErrorCode.
ERR_ProtectedInStruct
, Line = 8, Column = 45 });
12192
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "E").WithArguments("S.E"),
12195
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "F").WithArguments("S.F"),
12198
Diagnostic(ErrorCode.
ERR_ProtectedInStruct
, "this").WithArguments("S.this[int]"),