62 references to BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_Operators.cs (3)
73
new
BinaryOperatorSignature
(
684
resultSignature = new
BinaryOperatorSignature
(kind, leftType: null, rightType: null, CreateErrorType());
706
resultSignature = new
BinaryOperatorSignature
(kind | BinaryOperatorKind.NullableNull, leftType: null, rightType: null,
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (35)
312
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean)));
318
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, delegateType));
485
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingAddition, enumType, underlying, enumType));
486
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumAddition, underlying, enumType, enumType));
487
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingAddition, nullableEnum, nullableUnderlying, nullableEnum));
488
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumAddition, nullableUnderlying, nullableEnum, nullableEnum));
493
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying));
494
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType));
495
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying));
496
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum));
506
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying)
508
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType)
510
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying)
512
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum)
516
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumSubtraction, underlying, enumType, enumType)
518
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumSubtraction, nullableUnderlying, nullableEnum, nullableEnum)
529
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Enum, enumType, enumType, boolean));
530
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Lifted | BinaryOperatorKind.Enum, nullableEnum, nullableEnum, boolean));
535
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Enum, enumType, enumType, enumType));
536
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Lifted | BinaryOperatorKind.Enum, nullableEnum, nullableEnum, nullableEnum));
552
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType));
553
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndUIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType));
554
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndLongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType));
555
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndULongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType));
556
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.IntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType, pointerType));
557
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UIntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType, pointerType));
558
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType, pointerType));
559
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.ULongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType, pointerType));
562
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType));
563
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndUIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType));
564
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndLongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType));
565
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerAndULongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType));
566
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.PointerSubtraction, pointerType, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64)));
584
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Pointer, voidPointerType, voidPointerType, Compilation.GetSpecialType(SpecialType.System_Boolean)));
763
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean)));
Compilation\BuiltInOperators.cs (6)
699
new
BinaryOperatorSignature
(BinaryOperatorKind.Utf8Addition, readonlySpanOfByte, readonlySpanOfByte, readonlySpanOfByte)), null);
717
return new
BinaryOperatorSignature
(kind, left, left, left);
719
return new
BinaryOperatorSignature
(kind, left, RightType(kind), ReturnType(kind));
728
return new
BinaryOperatorSignature
(kind, left, rightType, left);
736
return new
BinaryOperatorSignature
(kind, left, left, _compilation.GetSpecialType(SpecialType.System_Boolean));
738
return new
BinaryOperatorSignature
(kind, left, RightType(kind), ReturnType(kind));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\OperatorTests.cs (18)
8161
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Dynamic, leftType, rightType, leftType);
8165
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Dynamic, leftType, rightType, rightType);
8174
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Delegate,
8181
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Delegate,
8187
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Object, compilation.ObjectType, compilation.ObjectType,
8198
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.String, leftType, compilation.ObjectType, leftType);
8203
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.String, compilation.ObjectType, rightType, rightType);
8212
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Pointer, leftType, symbol1.Parameters[1].Type.GetSymbol(), leftType);
8217
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Pointer, symbol1.Parameters[0].Type.GetSymbol(), rightType, rightType);
8224
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.String, leftType, symbol1.Parameters[1].Type.GetSymbol(), leftType);
8229
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Pointer, leftType, rightType, compilation.GetSpecialType(SpecialType.System_Int64));
8236
signature = new
BinaryOperatorSignature
(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, leftType, signature.RightType, leftType);
8243
signature = new
BinaryOperatorSignature
(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, signature.LeftType, rightType, rightType);
8248
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Enum, leftType, rightType, leftType.EnumUnderlyingTypeOrSelf());
8258
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Enum, leftType, rightType, compilation.GetSpecialType(SpecialType.System_Boolean));
8265
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Enum, leftType, rightType, leftType);
8270
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Delegate, leftType, leftType, leftType);
8280
signature = new
BinaryOperatorSignature
(op | BinaryOperatorKind.Pointer,