152 references to Equal
Microsoft.CodeAnalysis.CSharp (152)
Binder\Binder_Operators.cs (10)
539bool isEquality = kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual; 542return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 546(kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual)) 730(signature.Kind.Operator() == BinaryOperatorKind.Equal || signature.Kind.Operator() == BinaryOperatorKind.NotEqual) && 1294case BinaryOperatorKind.Equal: 1397bool isEquality = kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual; 1759case BinaryOperatorKind.Equal: 1944if (op == BinaryOperatorKind.Equal || op == BinaryOperatorKind.NotEqual) 1961return (leftIsNull == rightIsNull) == (op == BinaryOperatorKind.Equal) ? ConstantValue.True : ConstantValue.False; 2242case SyntaxKind.EqualsExpression: return BinaryOperatorKind.Equal;
Binder\Binder_Patterns.cs (2)
1636if (operation == BinaryOperatorKind.Equal) 1686_ => BinaryOperatorKind.Equal,
Binder\Binder_TupleOperators.cs (1)
148case BinaryOperatorKind.Equal:
Binder\DecisionDagBuilder.cs (6)
502if (ValueSetFactory.ForInput(input)?.Related(BinaryOperatorKind.Equal, constant.ConstantValue).IsEmpty == true) 1141return resultForRelation(BinaryOperatorKind.Equal, t.Value); 1353handleRelationWithValue(BinaryOperatorKind.Equal, v2.Value, 1493if (lengthValues.All(BinaryOperatorKind.Equal, lengthValue)) 1499if (!_forLowering && lengthValues.Any(BinaryOperatorKind.Equal, lengthValue)) 2240return knownResult(BinaryOperatorKind.Equal, t.Value, offset) ??
Binder\PatternExplainer.cs (3)
408if (lengthValues.All(BinaryOperatorKind.Equal, lengthValue)) 605addRelation(BinaryOperatorKind.Equal, v.Value); 655remainingValues.Any(BinaryOperatorKind.Equal, constantValue))
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (10)
310case BinaryOperatorKind.Equal: 351case BinaryOperatorKind.Equal: 378case BinaryOperatorKind.Equal: 441bool useIdentityConversion = kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual; 455if ((kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual) 521case BinaryOperatorKind.Equal: 576case BinaryOperatorKind.Equal: 646case BinaryOperatorKind.Equal: 712bool isEquality = kind == BinaryOperatorKind.Equal || kind == BinaryOperatorKind.NotEqual; 1036case BinaryOperatorKind.Equal:
Binder\Semantics\Operators\OperatorFacts.cs (1)
195case BinaryOperatorKind.Equal: return WellKnownMemberNames.EqualityOperatorName;
Binder\Semantics\Operators\OperatorKind.cs (30)
541IntEqual = Int | Equal, 542UIntEqual = UInt | Equal, 543LongEqual = Long | Equal, 544ULongEqual = ULong | Equal, 545NIntEqual = NInt | Equal, 546NUIntEqual = NUInt | Equal, 547FloatEqual = Float | Equal, 548DoubleEqual = Double | Equal, 549DecimalEqual = Decimal | Equal, 550BoolEqual = Bool | Equal, 551EnumEqual = Enum | Equal, 552NullableNullEqual = NullableNull | Equal, 553UserDefinedEqual = UserDefined | Equal, 554LiftedIntEqual = Lifted | Int | Equal, 555LiftedUIntEqual = Lifted | UInt | Equal, 556LiftedLongEqual = Lifted | Long | Equal, 557LiftedULongEqual = Lifted | ULong | Equal, 558LiftedNIntEqual = Lifted | NInt | Equal, 559LiftedNUIntEqual = Lifted | NUInt | Equal, 560LiftedFloatEqual = Lifted | Float | Equal, 561LiftedDoubleEqual = Lifted | Double | Equal, 562LiftedDecimalEqual = Lifted | Decimal | Equal, 563LiftedBoolEqual = Lifted | Bool | Equal, 564LiftedEnumEqual = Lifted | Enum | Equal, 565LiftedUserDefinedEqual = Lifted | UserDefined | Equal, 566ObjectEqual = Object | Equal, 567StringEqual = String | Equal, 568DelegateEqual = Delegate | Equal, 569PointerEqual = Pointer | Equal, 570DynamicEqual = Dynamic | Equal,
Binder\Semantics\Operators\OperatorKindExtensions.cs (2)
204case BinaryOperatorKind.Equal: 365case BinaryOperatorKind.Equal: return ExpressionType.Equal;
CodeGen\EmitOperators.cs (3)
356goto case BinaryOperatorKind.Equal; 358case BinaryOperatorKind.Equal: 818case BinaryOperatorKind.Equal:
CodeGen\EmitStatement.cs (3)
232Debug.Assert(opKind == BinaryOperatorKind.Equal || 305case BinaryOperatorKind.Equal: 498case BinaryOperatorKind.Equal:
Compilation\BuiltInOperators.cs (1)
727case BinaryOperatorKind.Equal:
Compilation\CSharpCompilation.cs (4)
4262if (binaryKind is BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual && 4279if (binaryKind is BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual && 4302if (binaryKind is BinaryOperatorKind.Equal or 4357if (binaryKind is BinaryOperatorKind.Equal or
Compilation\CSharpSemanticModel.cs (1)
3858(op == BinaryOperatorKind.Equal || op == BinaryOperatorKind.NotEqual) &&
FlowAnalysis\AbstractFlowPass.cs (2)
2624return kind.Operator() is BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual 2636=> binary.OperatorKind.Operator() == BinaryOperatorKind.Equal;
FlowAnalysis\NullableWalker.cs (6)
4892&& binary.OperatorKind.Operator() is BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual) 4963=> binary.OperatorKind.Operator() == BinaryOperatorKind.Equal; 4995if (binary.OperatorKind.Operator() is not (BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual)) 5222if (op == BinaryOperatorKind.Equal || op == BinaryOperatorKind.NotEqual) 5238bool nonNullCase = op != BinaryOperatorKind.Equal; // true represents WhenTrue 5262case BinaryOperatorKind.Equal:
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
453case BinaryOperatorKind.Equal:
Lowering\DiagnosticsPass_Warnings.cs (2)
758case BinaryOperatorKind.Equal: 807case BinaryOperatorKind.Equal:
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
351return MakeNullCheck(d.Syntax, input, input.Type.IsNullableType() ? BinaryOperatorKind.NullableNullEqual : BinaryOperatorKind.Equal); 397var operatorKind = BinaryOperatorKind.Equal | operatorType; 406Debug.Assert(operatorKind.Operator() == BinaryOperatorKind.Equal);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (14)
488BinaryOperatorKind.Equal; 503BinaryOperatorKind.Equal; 567operatorKind.Operator() == BinaryOperatorKind.Equal) 816return MakeLiteral(syntax, ConstantValue.Create(kind.Operator() == BinaryOperatorKind.Equal), boolType); 870if (operatorKind == BinaryOperatorKind.Equal || operatorKind == BinaryOperatorKind.NotEqual) 873BoundExpression result = operatorKind == BinaryOperatorKind.Equal ? 1000if (kind.Operator() is BinaryOperatorKind.Equal or BinaryOperatorKind.NotEqual) 1043case BinaryOperatorKind.Equal: 1045leftOperator = BinaryOperatorKind.Equal; 1215case BinaryOperatorKind.Equal: 1246if (operatorKind == BinaryOperatorKind.Equal || operatorKind == BinaryOperatorKind.NotEqual) 1261rewrittenAlternative: MakeLiteral(syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType), 2071Debug.Assert((operatorKind == BinaryOperatorKind.Equal) || (operatorKind == BinaryOperatorKind.NotEqual) || 2090case BinaryOperatorKind.Equal:
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (7)
259return new BoundLiteral(left.Syntax, ConstantValue.Create(nullnull.Kind == BinaryOperatorKind.Equal), boolType); 316bool boolValue = operatorKind == BinaryOperatorKind.Equal; // true/false 341_factory.Binary(BinaryOperatorKind.Equal, boolType, leftHasValue, rightHasValue), 502var logicalOperator = operatorKind == BinaryOperatorKind.Equal ? BinaryOperatorKind.LogicalBoolAnd : BinaryOperatorKind.LogicalBoolOr; 556if (operatorKind == BinaryOperatorKind.Equal) 569return new BoundLiteral(left.Syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType); 586if (operatorKind == BinaryOperatorKind.Equal)
Lowering\SyntheticBoundNodeFactory.cs (2)
1743Debug.Assert((operatorKind == BinaryOperatorKind.Equal) || (operatorKind == BinaryOperatorKind.NotEqual) || 1762case BinaryOperatorKind.Equal:
Operations\CSharpOperationFactory_Methods.cs (1)
590case CSharp.BinaryOperatorKind.Equal:
Utilities\IValueSet.cs (1)
35/// are <see cref="BinaryOperatorKind.Equal"/> for all supported types, and for numeric types we also support
Utilities\ValueSetFactory.BoolValueSet.cs (4)
47case (Equal, true): 49case (Equal, false): 62case (Equal, true): 64case (Equal, false):
Utilities\ValueSetFactory.BoolValueSetFactory.cs (3)
32case (Equal, true): 34case (Equal, false): 60Debug.Assert(relation == BinaryOperatorKind.Equal);
Utilities\ValueSetFactory.ByteTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.CharTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.DecimalTC.cs (1)
93case Equal:
Utilities\ValueSetFactory.DoubleTC.cs (1)
68case Equal:
Utilities\ValueSetFactory.EnumeratedValueSet.cs (5)
58if (this.Any(BinaryOperatorKind.Equal, (T)(object)"")) 61if (this.Any(BinaryOperatorKind.Equal, (T)(object)c.ToString())) 69if (this.Any(BinaryOperatorKind.Equal, value)) 81case BinaryOperatorKind.Equal: 94case BinaryOperatorKind.Equal:
Utilities\ValueSetFactory.EnumeratedValueSetFactory.cs (3)
31case Equal: 43Debug.Assert(relation == BinaryOperatorKind.Equal); 53result = result.Union(Related(Equal, value));
Utilities\ValueSetFactory.FloatingValueSet.cs (2)
72if (tc.Related(Equal, tc.NaN, value)) 76case BinaryOperatorKind.Equal:
Utilities\ValueSetFactory.IntTC.cs (1)
38case Equal:
Utilities\ValueSetFactory.LongTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.NonNegativeIntValueSetFactory.cs (1)
44case Equal:
Utilities\ValueSetFactory.NumericValueSet.cs (5)
82case Equal: 122case Equal: 123return _intervals.Length == 1 && _tc.Related(Equal, _intervals[0].first, value) && _tc.Related(Equal, _intervals[0].last, value); 215if (builder.Count > 0 && (tc.Related(Equal, tc.MinValue, first) || tc.Related(GreaterThanOrEqual, builder.Last().last, tc.Prev(first))))
Utilities\ValueSetFactory.NumericValueSetFactory.cs (1)
45case Equal:
Utilities\ValueSetFactory.SByteTC.cs (1)
27case Equal:
Utilities\ValueSetFactory.ShortTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.SingleTC.cs (1)
72case Equal:
Utilities\ValueSetFactory.UIntTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.ULongTC.cs (1)
28case Equal:
Utilities\ValueSetFactory.UShortTC.cs (1)
28case Equal: