Skip to content

Add a method that checks if a given Type is a super-type of another #31

@kaqqao

Description

@kaqqao

When dealing with Types and not Classes, it's rather hard to tell if a given type is a super- (or sub-) type of another, as there is no equivalent to Class#isAssignableFrom.
GentyRef has a method for this, GenericTypeReflector.isSuperType(superType, subType), but that lib is rather outdated and seems unmaintained, and it generally doesn't make sense to add another type resolution lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions