81 references to ERR_ExplicitImplementationOfOperatorsMustBeStatic
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2185
or ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
93
diagnostics.Add(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, this.GetFirstLocation(), this);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (3)
240
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1)").WithLocation(4, 21),
249
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1, C1)").WithLocation(5, 21),
258
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1, C1, C1)").WithLocation(6, 21),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Symbols\StaticAbstractMembersInInterfacesTests.cs (18)
17613
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
17756
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
17887
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
18000
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
18148
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4, int)").WithLocation(26, 24 + checkedKeyword.Length),
18279
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4, int)").WithLocation(26, 24 + checkedKeyword.Length),
18394
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18541
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18688
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18841
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
19016
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + op + "(I1, int)").WithLocation(22, 20),
19038
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1, int)").WithLocation(22, 20 + checkedKeyword.Length),
19208
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + op + "(I1, int)").WithLocation(22, 20),
19230
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1, int)").WithLocation(22, 20 + checkedKeyword.Length),
28454
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C4." + op + " operator " + checkedKeyword + "int(C4)").WithLocation(26, 30 + checkedKeyword.Length),
28585
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C4." + op + " operator " + checkedKeyword + "int(C4)").WithLocation(26, 30 + checkedKeyword.Length),
28700
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("I5<T>." + op + " operator " + checkedKeyword + "int(T)").WithLocation(22, 29 + checkedKeyword.Length),
28857
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("I5<T>." + op + " operator " + checkedKeyword + "int(T)").WithLocation(22, 29 + checkedKeyword.Length),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (58)
Parsing\MemberDeclarationParsingTests.cs (58)
2304
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
2317
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
2424
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2446
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2549
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2571
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2667
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
2683
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
2773
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
2789
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
3185
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
3198
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
3309
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3331
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3437
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3459
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3559
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
3575
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
3669
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
3685
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
4227
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
4237
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
4340
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4359
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4457
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4476
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4568
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
4581
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
4667
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
4680
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
5067
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
5077
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
5184
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5203
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5305
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5324
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5420
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
5433
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
5523
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
5536
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
6252
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6262
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6342
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 24));
6355
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 24));
6493
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6506
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6593
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
6606
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
6977
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 33));
6987
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 33));
7074
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 24));
7090
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 24));
7184
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 25));
7197
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 25));
7288
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
7301
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
7392
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
7405
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));