41 references to ERR_CantCallSpecialMethod
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Lookup.cs (1)
1427
diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.
ERR_CantCallSpecialMethod
, unwrappedSymbol) : null;
Errors\ErrorFacts.cs (1)
910
case ErrorCode.
ERR_CantCallSpecialMethod
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
Semantics\InitOnlyMemberTests.cs (1)
3268
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Property").WithArguments("C.Property.set").WithLocation(15, 11)
Semantics\NullableTests.cs (1)
2101
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Implicit").WithArguments("int?.implicit operator int?(int)")
Semantics\SemanticErrorTests.cs (15)
11317
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Q").WithArguments("C.Q.get").WithLocation(7, 20),
11320
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(7, 14),
11323
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("D.P.get").WithLocation(8, 19),
11326
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Q").WithArguments("C.Q.set").WithLocation(8, 11),
11329
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("C.P.get").WithLocation(9, 16));
11361
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("A.B.C.P.get").WithLocation(10, 30),
11364
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Q").WithArguments("A.B.C.Q.get").WithLocation(11, 19),
11367
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("A.B.C.P.set").WithLocation(12, 34),
11370
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Q").WithArguments("A.B.C.Q.set").WithLocation(13, 17));
11424
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Increment").WithArguments("MyClass.operator ++(MyClass)"));
11448
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Addition").WithArguments("System.IntPtr.operator +(System.IntPtr, int)").WithLocation(7, 16),
11451
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Subtraction").WithArguments("System.IntPtr.operator -(System.IntPtr, int)").WithLocation(8, 16),
11454
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Equality").WithArguments("System.IntPtr.operator ==(System.IntPtr, System.IntPtr)").WithLocation(9, 16),
11457
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Inequality").WithArguments("System.IntPtr.operator !=(System.IntPtr, System.IntPtr)").WithLocation(10, 16),
11460
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Explicit").WithArguments("System.IntPtr.explicit operator System.IntPtr(int)").WithLocation(11, 16));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (22)
Compilation\GetSemanticInfoTests.cs (1)
4502
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("A.Nested.P.get")
Symbols\CheckedUserDefinedOperatorsTests.cs (3)
316
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, name).WithArguments("C.operator checked " + op + "(C)").WithLocation(8, 18),
1486
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, name).WithArguments("C.operator checked " + op + "(C, C)").WithLocation(8, 18),
2720
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_CheckedExplicit").WithArguments("C.explicit operator checked int(C)").WithLocation(8, 18),
Symbols\ExtensionMethodTests.cs (5)
1833
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(6, 14),
1835
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(7, 9),
1837
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("C.P.get").WithLocation(7, 15),
1839
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(14, 11));
1866
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Q").WithArguments("C.Q.get").WithLocation(9, 16));
Symbols\IndexedPropertyTests.cs (2)
872
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("A.this[int].set").WithLocation(9, 11),
874
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("A.this[int].get").WithLocation(9, 23));
Symbols\IndexerTests.cs (6)
936
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("C.this[int].get"),
938
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Item").WithArguments("C.this[int].set"));
1627
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("A.this[int].get"),
1630
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("A.this[int].get"),
1659
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("B.this[int].get"),
1662
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("A.this[int].get"));
Symbols\Source\EventTests.cs (1)
1671
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "add_Event2").WithArguments("Base.Event2.add"));
Symbols\Source\PropertyTests.cs (1)
1034
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Goo").WithArguments("I.Goo.get"));
Symbols\StaticAbstractMembersInInterfacesTests.cs (2)
14463
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Item").WithArguments("I1.this[int].set").WithLocation(11, 11),
14466
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("I1.this[int].get").WithLocation(11, 25)
Symbols\UnsignedRightShiftTests.cs (1)
2068
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_UnsignedRightShift").WithArguments("C1.operator >>>(C1, int)").WithLocation(9, 40)