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

Fix annotations being not expected in the middle of an array type by java parser #22391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fan-tom
Copy link

@fan-tom fan-tom commented Jan 16, 2025

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 to val, as IDEA suggested.

…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
@fan-tom fan-tom marked this pull request as ready for review January 17, 2025 09:35
@fan-tom

This comment was marked as resolved.

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

Successfully merging this pull request may close these issues.

Cannot parse Java file with type annotations on array or path selection
1 participant