Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitive type parameter bounds don't have annotations #193

Closed
Ladicek opened this issue May 10, 2022 · 1 comment
Closed

Transitive type parameter bounds don't have annotations #193

Ladicek opened this issue May 10, 2022 · 1 comment
Assignees
Milestone

Comments

@Ladicek
Copy link
Contributor

Ladicek commented May 10, 2022

In a situation like this:

class MyClass<@Ann1 A extends @Ann2 Number> {
    <@Ann3 B extends @Ann4 A> void myMethod() {
    }
}

when I look up the type parameter on the method (@Ann3 B), then nagivate to its bound (@Ann4 A), then navigate to its bound (Number), I miss the @Ann2 annotation.

A situation like this occurs in the CDI Language Model TCK (which is admittedly my own doing...), so Jandex should support it.

I think the reason why this isn't supported in Jandex yet is because this can't be solved in general when indexing individual classes. This particular example could be, but one may have an inner class whose type parameter bound is a type parameter of its enclosing class. To fix this issue in general, an editing pass over the index during Indexer.complete() is required.

@Ladicek Ladicek added this to the 3.0.0 milestone May 10, 2022
@Ladicek Ladicek self-assigned this May 10, 2022
@Ladicek Ladicek changed the title transitive type parameter bounds don't have annotations Transitive type parameter bounds don't have annotations May 10, 2022
@Ladicek
Copy link
Contributor Author

Ladicek commented May 10, 2022

Done in #194.

@Ladicek Ladicek closed this as completed May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant