45 references to Equals
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_Constraints.cs (1)
497
if (!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)
26
Debug.Assert(!type.HasType || type.
Equals
(example, TypeCompareKind.AllIgnoreOptions));
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
2961
if (!candidate.
Equals
(candidate2, TypeCompareKind.ConsiderEverything) &&
2974
Debug.Assert(!best.
Equals
(candidate, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
3394
type.SetUnknownNullabilityForReferenceTypes().
Equals
(type, TypeCompareKind.ConsiderEverything));
3437
if (bound.
Equals
(candidate, comparison))
3468
else if (bound.
Equals
(candidate, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes))
3529
return x.
Equals
(y, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes);
BoundTree\BoundInlineArrayAccess.cs (1)
62
Debug.Assert(((NamedTypeSymbol)Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].
Equals
(Expression.Type?.TryGetInlineArrayElementField()?.TypeWithAnnotations ?? default, TypeCompareKind.ConsiderEverything));
BoundTree\UnboundLambda.cs (2)
853
lambdaSymbol.ReturnTypeWithAnnotations.
Equals
(returnType, TypeCompareKind.ConsiderEverything) &&
1123
if (!other.ParameterTypes[i].
Equals
(this.ParameterTypes[i], TypeCompareKind.ConsiderEverything) ||
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
540
return otherType.
Equals
(expectedType, TypeCompareKind.CLRSignatureCompareOptions);
FlowAnalysis\NullableWalker.cs (4)
10017
if (explicitType?.
Equals
(targetTypeWithNullability, TypeCompareKind.ConsiderEverything) == true)
10481
isLiftedConversion = parameterType.
Equals
(underlyingOperandTypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
13464
return type1.
Equals
(type2, TypeCompareKind.AllIgnoreOptions) &&
13465
!type1.
Equals
(type2, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.IgnoreNullableModifiersForReferenceTypes);
Symbols\AnonymousTypes\AnonymousTypeField.cs (1)
63
return 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)
39
public 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)
588
if (!returnType1.
Equals
(returnType2, typeComparison))
767
if (!type1.
Equals
(type2, typeComparison))
Symbols\NamedTypeSymbol.cs (1)
1126
if (!typeArgument.
Equals
(otherTypeArgument, comparison))
Symbols\PointerTypeSymbol.cs (1)
241
if ((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)
916
if (!TypeWithAnnotations.
Equals
(implementation.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions))
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2985
if (!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)
977
if (!overridingMemberType.
Equals
(overriddenMemberType, TypeCompareKind.AllIgnoreOptions))
1088
!overridingMemberType.
Equals
(overriddenMemberType, TypeCompareKind.AllIgnoreOptions))
1248
return overridingReturnType.
Equals
(overriddenReturnType, TypeCompareKind.AllIgnoreOptions);
Symbols\Source\SourceNamedTypeSymbol.cs (3)
545
Debug.Assert(originalConstraintTypes[j].
Equals
(mergedConstraintTypes[j], TypeCompareKind.ObliviousNullableModifierMatchesAny));
604
if (!constraintType1.
Equals
(constraintType2, TypeCompareKind.ObliviousNullableModifierMatchesAny))
611
if (!constraintType1.
Equals
(constraintType2, TypeCompareKind.ConsiderEverything))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
491
bool hasTypeDifferences = !constructedDefinition.ReturnTypeWithAnnotations.
Equals
(implementation.ReturnTypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
Symbols\Source\SourcePropertySymbol.cs (1)
733
bool hasTypeDifferences = !TypeWithAnnotations.
Equals
(implementation.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions);
Symbols\SubstitutedMethodSymbol.cs (1)
469
if (!this.TypeArgumentsWithAnnotations[i].
Equals
(other.TypeArgumentsWithAnnotations[i], compareKind))
Symbols\TypeWithAnnotations.cs (2)
417
return x.
Equals
(y, _compareKind);
763
return other is TypeWithAnnotations t && this.
Equals
(t, TypeCompareKind.ConsiderEverything);
Symbols\UpdatedContainingSymbolLocal.cs (1)
69
(TypeWithAnnotations.
Equals
(otherLocal.TypeWithAnnotations, compareKind) &&