44 references to ERR_CantCallSpecialMethod
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Lookup.cs (1)
1519
diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.
ERR_CantCallSpecialMethod
, unwrappedSymbol) : null;
Errors\ErrorFacts.cs (1)
972
or ErrorCode.
ERR_CantCallSpecialMethod
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_CallerInfoAttributes.cs (1)
5899
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Item").WithArguments("C.this[int].set").WithLocation(6, 11));
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (2)
5468
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_IncrementAssignment").WithArguments("C2.operator ++()").WithLocation(9, 11)
17124
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_AdditionAssignment").WithArguments("C2.operator +=(int)").WithLocation(9, 11)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
Semantics\InitOnlyMemberTests.cs (1)
3273
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Property").WithArguments("C.Property.set").WithLocation(15, 11)
Semantics\NullableTests.cs (1)
2097
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Implicit").WithArguments("int?.implicit operator int?(int)")
Semantics\SemanticErrorTests.cs (15)
11321
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Q").WithArguments("C.Q.get").WithLocation(7, 20),
11324
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(7, 14),
11327
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("D.P.get").WithLocation(8, 19),
11330
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Q").WithArguments("C.Q.set").WithLocation(8, 11),
11333
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("C.P.get").WithLocation(9, 16));
11365
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("A.B.C.P.get").WithLocation(10, 30),
11368
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Q").WithArguments("A.B.C.Q.get").WithLocation(11, 19),
11371
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("A.B.C.P.set").WithLocation(12, 34),
11374
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Q").WithArguments("A.B.C.Q.set").WithLocation(13, 17));
11428
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Increment").WithArguments("MyClass.operator ++(MyClass)"));
11452
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Addition").WithArguments("System.IntPtr.operator +(System.IntPtr, int)").WithLocation(7, 16),
11455
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Subtraction").WithArguments("System.IntPtr.operator -(System.IntPtr, int)").WithLocation(8, 16),
11458
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Equality").WithArguments("System.IntPtr.operator ==(System.IntPtr, System.IntPtr)").WithLocation(9, 16),
11461
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_Inequality").WithArguments("System.IntPtr.operator !=(System.IntPtr, System.IntPtr)").WithLocation(10, 16),
11464
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)
335
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, name).WithArguments("C.operator checked " + op + "(C)").WithLocation(8, 18),
1511
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, name).WithArguments("C.operator checked " + op + "(C, C)").WithLocation(8, 18),
2745
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "op_CheckedExplicit").WithArguments("C.explicit operator checked int(C)").WithLocation(8, 18),
Symbols\ExtensionMethodTests.cs (5)
1829
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(6, 14),
1831
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(7, 9),
1833
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_P").WithArguments("C.P.get").WithLocation(7, 15),
1835
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_P").WithArguments("C.P.set").WithLocation(14, 11));
1862
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)
938
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("C.this[int].get"),
940
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Item").WithArguments("C.this[int].set"));
1629
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("A.this[int].get"),
1632
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("A.this[int].get"),
1661
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Item").WithArguments("B.this[int].get"),
1664
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)
1035
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "get_Goo").WithArguments("I.Goo.get"));
Symbols\StaticAbstractMembersInInterfacesTests.cs (2)
14421
Diagnostic(ErrorCode.
ERR_CantCallSpecialMethod
, "set_Item").WithArguments("I1.this[int].set").WithLocation(11, 11),
14424
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)