-
-
Notifications
You must be signed in to change notification settings - Fork 118
Various fixes for parsing type use annotations #206
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
base: master
Are you sure you want to change the base?
Conversation
1418c63
to
14a8c10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the spec agrees with you :) (im not a maintainer or anything but wanted to take a look)
https://docs.oracle.com/javase/specs/jls/se22/html/jls-8.html#jls-8.4.1
VariableArityParameter: {VariableModifier} UnannType {Annotation} ... Identifier
I'll note that youre upgrading the ABI here, from my POV thats fine, its likely the next release should include ABI 15 anyways (?), but the maintainers know better or feel differently. It might be worth keeping the ABI at 14 to play it safe ( |
Yes, keep commits (and PRs) atomic. Bumping ABI can be a breaking change for consumers stuck on an older version of the library. |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reasoning for the catch type extension seems legit, again though I'm no maintainer (sorry)
Fix type use annotations before spread parameter
Closes #205
The original fix was here 0d79d9f but there's a typo in that. Java doesn't allow annotations after the ellipsis at all. The original issue #184 as well as the minimal sample found by the maintainer #184 (comment) is for annotations before the ellipsis.
Fix type use annotations in catch types
Closes #208
According to the spec https://docs.oracle.com/javase/specs/jls/se24/html/jls-14.html#jls-CatchType, catch types can be annotated. Note that modifiers and _type can both accept annotations, but I have maintained the existing behaviour - by parsing annotations as part of the modifiers for the first type.