50 references to ERR_OperatorNeedsMatch
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
731
case ErrorCode.
ERR_OperatorNeedsMatch
:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2403
diagnostics.Add(ErrorCode.
ERR_OperatorNeedsMatch
, op1.Locations[0], op1,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (48)
Symbols\CheckedUserDefinedOperatorsTests.cs (8)
2173
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
2216
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
2273
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
2284
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
2317
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
2367
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
2378
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
2411
compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Symbols\DefaultInterfaceImplementationTests.cs (2)
49043
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "true").WithArguments("I2.operator true(I2)", "false").WithLocation(10, 33),
49046
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "false").WithArguments("I3.operator false(I3)", "true").WithLocation(15, 33),
Symbols\Source\MethodTests.cs (1)
2047
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "true").WithArguments("A.operator true(A, A)", "false")
Symbols\StaticAbstractMembersInInterfacesTests.cs (31)
7242
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
7547
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
7641
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
7740
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
8074
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
8171
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify(
12200
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
12495
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
17634
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadIncDecRetType or (int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
17777
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadIncDecRetType or (int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
17913
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
18056
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
18168
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(
18315
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(
18535
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(expected);
18727
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(expected);
18835
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(expected2);
18884
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(expected3);
18936
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
18989
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or
19092
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
19102
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
19144
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
19154
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
19206
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(
19261
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
22074
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.
ERR_OperatorNeedsMatch
)).Verify(
22224
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
22290
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
22335
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify(
32455
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
ERR_OperatorNeedsMatch
or (int)ErrorCode.WRN_EqualityOpWithoutEquals or
Symbols\SymbolErrorTests.cs (6)
2970
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "true").WithArguments("MyClass.operator true(MyClass)", "false"),
2973
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "<").WithArguments("MyClass.operator <(MyClass, int)", ">"),
2976
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, ">").WithArguments("MyClass.operator >(MyClass, double)", "<"),
2979
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "<=").WithArguments("MyClass.operator <=(MyClass, MyClass)", ">="),
2982
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, ">=").WithArguments("MyClass.operator >=(MyClass, MyClass)", "<="),
2985
Diagnostic(ErrorCode.
ERR_OperatorNeedsMatch
, "==").WithArguments("MyClass.operator ==(MyClass, MyClass)", "!=")