This project is read-only.

Limitation of generic type constraint overloading

Topics: VB Language Design
Apr 21, 2014 at 6:23 PM
The scenario:
    Public MustInherit Class BaseA

    End Class

    Public MustInherit Class BaseB

    End Class

    Public Sub VeryImportantOperation(Of U As BaseA)(value As U)

    End Sub

    Public Sub VeryImportantOperation(Of U As BaseB)(value As U)
        'VB complains about identical signatures
    End Sub
I don't see how this yields any ambiguity since a class can only inherit from a single base. Interfaces are a different story but for base classes I am unclear as to why this is unsupported as long as the base classes are in different inheritance chains.