32 references to ERR_OperatorsMustBeStatic
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
903
case ErrorCode.
ERR_OperatorsMustBeStatic
:
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
82
diagnostics.Add(ErrorCode.
ERR_OperatorsMustBeStatic
, this.Locations[0], this);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (30)
Symbols\CheckedUserDefinedOperatorsTests.cs (3)
254
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C.operator checked " + op + "(C)").WithLocation(4, 23)
1423
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C.operator checked " + op + "(C, C)").WithLocation(4, 23)
2661
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("C.explicit operator checked int(C)").WithLocation(4, 31)
Symbols\StaticAbstractMembersInInterfacesTests.cs (21)
1626
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "+").WithArguments("I1.operator +(I1)").WithLocation(7, 40)
17643
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C2.operator " + checkedKeyword + op + "(C2)").WithLocation(14, 24 + checkedKeyword.Length),
17649
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C3.operator " + checkedKeyword + op + "(C3)").WithLocation(20, 24 + checkedKeyword.Length),
17780
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C2.operator " + checkedKeyword + op + "(C2)").WithLocation(14, 24 + checkedKeyword.Length),
17783
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C3.operator " + checkedKeyword + op + "(C3)").WithLocation(20, 24 + checkedKeyword.Length),
17922
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C2.operator " + checkedKeyword + op + "(C2, int)").WithLocation(14, 24 + checkedKeyword.Length),
17928
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C3.operator " + checkedKeyword + op + "(C3, int)").WithLocation(20, 24 + checkedKeyword.Length),
18059
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C2.operator " + checkedKeyword + op + "(C2, int)").WithLocation(14, 24 + checkedKeyword.Length),
18062
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("C3.operator " + checkedKeyword + op + "(C3, int)").WithLocation(20, 24 + checkedKeyword.Length),
18171
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I3.operator " + checkedKeyword + op + "(I1)").WithLocation(12, 17 + checkedKeyword.Length),
18189
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I8<T>.operator " + checkedKeyword + op + "(T)").WithLocation(42, 16 + checkedKeyword.Length),
18318
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I3.operator " + checkedKeyword + op + "(I1)").WithLocation(12, 17 + checkedKeyword.Length),
18336
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I8<T>.operator " + checkedKeyword + op + "(T)").WithLocation(42, 16 + checkedKeyword.Length),
18521
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I3.operator " + checkedKeyword + op + "(I1, int)").WithLocation(12, 17 + checkedKeyword.Length),
18530
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I8<T>.operator " + checkedKeyword + op + "(T, int)").WithLocation(42, 16 + checkedKeyword.Length)
18713
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I3.operator " + checkedKeyword + op + "(I1, int)").WithLocation(12, 17 + checkedKeyword.Length),
18722
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, op).WithArguments("I8<T>.operator " + checkedKeyword + op + "(T, int)").WithLocation(42, 16 + checkedKeyword.Length)
27928
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("C2." + op + " operator " + checkedKeyword + "int(C2)").WithLocation(14, 30 + checkedKeyword.Length),
27934
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("C3." + op + " operator " + checkedKeyword + "int(C3)").WithLocation(20, 30 + checkedKeyword.Length),
28065
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("C2." + op + " operator " + checkedKeyword + "int(C2)").WithLocation(14, 30 + checkedKeyword.Length),
28068
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("C3." + op + " operator " + checkedKeyword + "int(C3)").WithLocation(20, 30 + checkedKeyword.Length),
Symbols\SymbolErrorTests.cs (2)
10575
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "int").WithArguments("x.ii.iii.implicit operator int(x.ii.iii)")
10725
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "+").WithArguments("IA.operator +(int, int)").WithLocation(4, 17),
Symbols\UserDefinedOperatorErrorTests.cs (4)
209
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "-").WithArguments("C.operator -(C, C)").WithLocation(5, 34),
215
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "<<").WithArguments("C.operator <<(C, int)").WithLocation(6, 32),
230
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "-").WithArguments("C.operator -(C)").WithLocation(10, 33),
236
Diagnostic(ErrorCode.
ERR_OperatorsMustBeStatic
, "~").WithArguments("C.operator ~(C)").WithLocation(11, 34),