-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cannot parse Java file with type annotations on array or path selection #19642
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
Comments
fan-tom
added a commit
to fan-tom/scala3
that referenced
this issue
Jan 16, 2025
…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
added a commit
that referenced
this issue
Jan 21, 2025
…java parser (#22391) 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.
tgodzik
pushed a commit
to scala/scala3-lts
that referenced
this issue
Apr 3, 2025
…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 [Cherry-picked 9c971be]
tgodzik
added a commit
to scala/scala3-lts
that referenced
this issue
Apr 3, 2025
…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 [Cherry-picked 9c971be]
tgodzik
pushed a commit
to scala/scala3-lts
that referenced
this issue
Apr 3, 2025
…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 [Cherry-picked 9c971be]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.4.0-RC4
Minimized code
Output
these errors do not appear all at the same time, but by commenting out the appropriate lines of one error to reveal another one.
Expectation
This is valid java accepted by Javac, see JLS 4.11. Note that this fails to parse in Scala 2.13 also
The text was updated successfully, but these errors were encountered: