This project is read-only.
1
Vote

Override Equals(object) - TypeParameterSymbol: C# & VB differ at where & implementation

description

C# has an internal Equals(object) on TypeParameterSymbol itself and checks
OriginalDefinition & ContainingSymbol.ContainingType

While VB has 5 different Equals(object) on derived symbols, but not on ALL derived symbols. I think we should consolidate these EQs in VB.

Following are symbols directly derived from TypeParameterSymbol:
  • highlighted are symbols override the Equals(object)
  • Existing in both C# and VB:
    CrefTypeParameterSymbol [BEQ]->_name,_ordinal,_syntaxReference.GetSyntax()
    IndexedTypeParameterSymbol[BEQ] -> Me Is obj
    SubstitutedTypeParameterSymbol[BEQ] -> Ordinal,ContainingSymbol
    Metadata.PE.PETypeParameterSymbol
    Retargeting.RetargetingTypeParameterSymbol
  • Existing in VB only:
    AnonymousTypeOrDelegateTypeParameterSymbol
    InstanceErrorTypeSymbol.ErrorTypeParameterSymbol[BEQ] -> _ordinal,_container
    ReducedExtensionMethodSymbol.ReducedTypeParameterSymbolBEQ] -> m_Ordinal,ContainingSymbol
    abstract SourceTypeParameterSymbol
    SynthesizedClonedTypeParameterSymbol
  • Existing in C# only:
    AnonymousTypeParameterSymbol
    ErrorTypeSymbol.ErrorTypeParameterSymbol
    abstract SourceTypeParameterSymbolBase

comments