-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix annotations being not expected in the middle of an array type by java parser #22391
Fix annotations being not expected in the middle of an array type by java parser #22391
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
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.
Hi @fan-tom. thanks for contributing to Scala 3 🎉 . Your changes only covers half of the issue (type annotations on array). To fully close the linked issue, a fix for path selection has to be submitted. Would you like to try fixing it or should we take it from here ? Your changes for annotations on array types are correct and can be merged when all the requirements to close the issue are met.
Thanks @hamzaremmal
Definitely, but I need inputs for that, like what's |
Oh, I just got that original issue speaks about such syntax |
…ava parser Java parser doesn't expect an annotation in the next types, while it should: - `Object @my.Ann []` - `Object @my.Ann [] @my.OtherAnn []` closes scala#19642
@hamzaremmal hasn't |
ed25fca
to
9c971be
Compare
Ah yes, it does |
Closes #19642
Currently Java parser doesn't expect annotation between type name and square brackets in an array type, or between pairs of square brackets in nested array types.
I added a call to corresponding parser method
annotations
when parsing array types.I also changed an unnecessary
var
toval
, as IDEA suggested.