Skip to content

GH-1557: Fix erroneous code generation for TypeTokens of raw annotated types#1558

Merged
elucash merged 1 commit intoimmutables:masterfrom
ascopes:bugfix/GH-1557
Jul 6, 2025
Merged

GH-1557: Fix erroneous code generation for TypeTokens of raw annotated types#1558
elucash merged 1 commit intoimmutables:masterfrom
ascopes:bugfix/GH-1557

Conversation

@ascopes
Copy link
Copy Markdown
Contributor

@ascopes ascopes commented Jul 6, 2025

Fixes GH-1557, where the use of documented annotations such as those in JSpecify resulted in the type representation including annotation names. This resulted in invalid code being generated for TypeToken.of($TYPE$.class) as the output would erroneously become TypeToken.of(@SomeAnnotationHere $TYPE$.class), which is invalid Java syntax.

@elucash elucash merged commit 07bdf72 into immutables:master Jul 6, 2025
16 checks passed
@elucash
Copy link
Copy Markdown
Member

elucash commented Jul 6, 2025

yes, it should be rawType

@elucash
Copy link
Copy Markdown
Member

elucash commented Jul 6, 2025

thank you, merging

@ascopes
Copy link
Copy Markdown
Contributor Author

ascopes commented Jul 14, 2025

@elucash hey, do you happen to know when the next release is likely to drop with this included in it?

Thanks!

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.

Nullable annotations that are marked as @Documented get injected into type use

2 participants