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

In some cases annotations on type variables are not seen in their typeBindings. #2949

Open
rluble opened this issue Sep 12, 2024 · 1 comment

Comments

@rluble
Copy link

rluble commented Sep 12, 2024

In code like:

  static class Ordering<T extends @Nullable Object> { }

  abstract class NullsFirstOrdering<TTT extends @Nullable Object> extends Ordering<@Nullable TTT> {

The @Nullable annotations on type variable TTT in Ordering<@Nullable TTT> are not seen through the type binding, ie.
typeBindingForOrderingTTT.getTypeArguments()[0] has empty getAnnotations() and getTypeAnnotations(), in fact the type binding returned as the same instance as the one in the definition.

This repros in JDT 4.29 and JDT 4.32.

@rluble
Copy link
Author

rluble commented Sep 14, 2024

JDT 4.27 is the last where the annotations are correctly returned.

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