Skip to content

Generic array type details resolution leads to partially resolved type #186

@mbellade

Description

@mbellade

When resolving a generic ArrayTypeDetails' relative type against a container which specializes its generic constituent type, a new ArrayTypeDetails is obtained with the correctly resolved constituent type, but its getArrayClassDetails() method still returns an instance of ClassDetails referring to the generic array class.

For example:

static class Root<T> {
	T[] rootArray;
}

static class Base1 extends Root<Integer> {
}

If I ask for:

var relativeType = rootArrayField.resolveRelativeType( base1ClassDetails );
relativeType.getConstituentType(); // this represents the Integer type
relativeType.getArrayClassDetails(); // this represents Object[].class

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