#1600 Stop infinite recursion for annotations applying to themselves#1601
Merged
elucash merged 3 commits intoimmutables:masterfrom Oct 3, 2025
Merged
#1600 Stop infinite recursion for annotations applying to themselves#1601elucash merged 3 commits intoimmutables:masterfrom
elucash merged 3 commits intoimmutables:masterfrom
Conversation
aldexis
commented
Oct 3, 2025
| import nonimmutables.ChildAnnotationA; | ||
| import nonimmutables.ChildAnnotationB; | ||
| import nonimmutables.ImmutablePassAnnsTargeting; | ||
| import nonimmutables.SelfApplyingAnnotation; |
Contributor
Author
There was a problem hiding this comment.
My IntelliJ was automatically reformatting the imports to import nonimmutables.*; so I had reverted this part and missed that I also reverted adding the import for the new annotation 🤦
aldexis
commented
Oct 3, 2025
| import org.immutables.value.Value; | ||
|
|
||
| @Value.Immutable | ||
| @Value.Style(passAnnotations = {SelfApplyingAnnotation.class}) |
Contributor
Author
There was a problem hiding this comment.
I had to add this for the test to pass (I somehow thought I had it passing before - not sure what happened). It doesn't really matter though, since what we want to test is the fact that it compiles fine, though I'm not sure how to best set this up
Member
|
Thank you for discovering the issue and promptly fixing it! Merging |
Contributor
Author
|
Thanks for merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #1600 which was a bug introduced by 3da32c5.
I'm honestly not too sure about where to put the test to reproduce the bug and validate it. Ultimately all that matters is that we test the compilation of the class, but I couldn't figure out where other examples of tests like this would live, so I pattern-matched from the test added in that same commit.
Happy to update the test to whatever makes sense!