Skip to content

Test Java annotations on varargs element types - #26188

Merged
Gedochao merged 1 commit into
scala:mainfrom
mkurz:test-java-annotated-varargs
Jun 1, 2026
Merged

Gedochao merged 1 commit into
scala:mainfrom
mkurz:test-java-annotated-varargs

Conversation

@mkurz

@mkurz mkurz commented May 30, 2026

Copy link
Copy Markdown
Contributor

Commit 9c971be made the Java parser consume annotations before array dimensions.

That also permits annotations before a varargs ellipsis, since varargs parameters pass through the same type parsing path. Add a regression test for that syntax:

void varargs(String @lib.Valid ... values) {}

How much have you relied on LLM-based tools in this contribution?

Minimally, for analysing the code.

How was the solution tested?

New test

Commit 9c971be made the
Java parser consume annotations before array dimensions.

That also permits annotations before a varargs ellipsis, since varargs
parameters pass through the same type parsing path. Add a regression
test for that syntax.
@Gedochao
Gedochao merged commit 1b67f5e into scala:main Jun 1, 2026
45 checks passed
@mkurz
mkurz deleted the test-java-annotated-varargs branch June 1, 2026 07:33
@mkurz

mkurz commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Please also add the [backport:nominated] label, thanks!

@Gedochao

Gedochao commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

@mkurz backport where? πŸ€”
this is just a test, can't see much motivation to backport this to 3.9.0 right now (it would likely still land there for 3.9.1 down the line)
Unless you mean the 3.3 LTS branch, in which case that's managed by a dedicated board, rather than backport labels.

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.

2 participants