Skip to content

ParameterizedTypeImpl: Check type parameter bounds of raw type #61

@ljacqu

Description

@ljacqu

When creating a parametrized type, there should be the possibility to check that the actual type arguments match the bounds of the type parameters. Given a class Foo:

public Foo<T extends Number> {
}

We should disallow new ParameterizedTypeImpl(Foo.class, null, String.class) since String does not extend Number.

Should probably still allow a way of doing it if somehow relevant / for performance, but by default this should probably be validated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions