45 references to Equals
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_Constraints.cs (1)
497if (!performOnlyCycleSafeValidation && constraintTypes.Contains(c => type.Equals(c, TypeCompareKind.AllIgnoreOptions)))
Binder\ForEachEnumeratorInfo.cs (1)
81(collectionType.HasInlineArrayAttribute(out _) && collectionType.TryGetInlineArrayElementField() is FieldSymbol elementField && elementType.Equals(elementField.TypeWithAnnotations, TypeCompareKind.ConsiderEverything)));
Binder\ForEachLoopBinder.cs (1)
888((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) &&
Binder\Semantics\BestTypeInferrer.cs (1)
26Debug.Assert(!type.HasType || type.Equals(example, TypeCompareKind.AllIgnoreOptions));
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
2961if (!candidate.Equals(candidate2, TypeCompareKind.ConsiderEverything) && 2974Debug.Assert(!best.Equals(candidate, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3394type.SetUnknownNullabilityForReferenceTypes().Equals(type, TypeCompareKind.ConsiderEverything)); 3437if (bound.Equals(candidate, comparison)) 3468else if (bound.Equals(candidate, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)) 3529return x.Equals(y, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes);
BoundTree\BoundInlineArrayAccess.cs (1)
62Debug.Assert(((NamedTypeSymbol)Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Equals(Expression.Type?.TryGetInlineArrayElementField()?.TypeWithAnnotations ?? default, TypeCompareKind.ConsiderEverything));
BoundTree\UnboundLambda.cs (2)
853lambdaSymbol.ReturnTypeWithAnnotations.Equals(returnType, TypeCompareKind.ConsiderEverything) && 1123if (!other.ParameterTypes[i].Equals(this.ParameterTypes[i], TypeCompareKind.ConsiderEverything) ||
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
540return otherType.Equals(expectedType, TypeCompareKind.CLRSignatureCompareOptions);
FlowAnalysis\NullableWalker.cs (4)
10017if (explicitType?.Equals(targetTypeWithNullability, TypeCompareKind.ConsiderEverything) == true) 10481isLiftedConversion = parameterType.Equals(underlyingOperandTypeWithAnnotations, TypeCompareKind.AllIgnoreOptions); 13464return type1.Equals(type2, TypeCompareKind.AllIgnoreOptions) && 13465!type1.Equals(type2, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.IgnoreNullableModifiersForReferenceTypes);
Symbols\AnonymousTypes\AnonymousTypeField.cs (1)
63return x.TypeWithAnnotations.Equals(y.TypeWithAnnotations, comparison)
Symbols\ArrayTypeSymbol.cs (1)
355!other.ElementTypeWithAnnotations.Equals(ElementTypeWithAnnotations, comparison))
Symbols\ConversionSignatureComparer.cs (1)
52&& member1.ParameterTypesWithAnnotations[0].Equals(member2.ParameterTypesWithAnnotations[0], TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)
Symbols\DiscardSymbol.cs (1)
39public override bool Equals(Symbol? obj, TypeCompareKind compareKind) => obj is DiscardSymbol other && this.TypeWithAnnotations.Equals(other.TypeWithAnnotations, compareKind);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
725|| !ReturnTypeWithAnnotations.Equals(other.ReturnTypeWithAnnotations, compareKind))
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
63&& TypeWithAnnotations.Equals(other.TypeWithAnnotations, compareKind);
Symbols\MemberSignatureComparer.cs (2)
588if (!returnType1.Equals(returnType2, typeComparison)) 767if (!type1.Equals(type2, typeComparison))
Symbols\NamedTypeSymbol.cs (1)
1126if (!typeArgument.Equals(otherTypeArgument, comparison))
Symbols\PointerTypeSymbol.cs (1)
241if ((object?)other == null || !other._pointedAtType.Equals(_pointedAtType, comparison))
Symbols\Source\LambdaSymbol.cs (1)
403(p1, p2, compareKind) => p1.Equals(p2, compareKind))
Symbols\Source\SourceEventSymbol.cs (1)
916if (!TypeWithAnnotations.Equals(implementation.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions))
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2985if (!op1.ParameterTypesWithAnnotations[p].Equals(op2.ParameterTypesWithAnnotations[p], TypeCompareKind.AllIgnoreOptions)) 5403&& field.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions)) 5412&& prop.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions))
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
977if (!overridingMemberType.Equals(overriddenMemberType, TypeCompareKind.AllIgnoreOptions)) 1088!overridingMemberType.Equals(overriddenMemberType, TypeCompareKind.AllIgnoreOptions)) 1248return overridingReturnType.Equals(overriddenReturnType, TypeCompareKind.AllIgnoreOptions);
Symbols\Source\SourceNamedTypeSymbol.cs (3)
545Debug.Assert(originalConstraintTypes[j].Equals(mergedConstraintTypes[j], TypeCompareKind.ObliviousNullableModifierMatchesAny)); 604if (!constraintType1.Equals(constraintType2, TypeCompareKind.ObliviousNullableModifierMatchesAny)) 611if (!constraintType1.Equals(constraintType2, TypeCompareKind.ConsiderEverything))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
491bool hasTypeDifferences = !constructedDefinition.ReturnTypeWithAnnotations.Equals(implementation.ReturnTypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
Symbols\Source\SourcePropertySymbol.cs (1)
733bool hasTypeDifferences = !TypeWithAnnotations.Equals(implementation.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
Symbols\SubstitutedMethodSymbol.cs (1)
469if (!this.TypeArgumentsWithAnnotations[i].Equals(other.TypeArgumentsWithAnnotations[i], compareKind))
Symbols\TypeWithAnnotations.cs (2)
417return x.Equals(y, _compareKind); 763return other is TypeWithAnnotations t && this.Equals(t, TypeCompareKind.ConsiderEverything);
Symbols\UpdatedContainingSymbolLocal.cs (1)
69(TypeWithAnnotations.Equals(otherLocal.TypeWithAnnotations, compareKind) &&