Don't add annotation if it doesn't have the correct @Target#259
Merged
Don't add annotation if it doesn't have the correct @Target#259
@Target#259Conversation
4874cf5 to
92d276c
Compare
This is a further refinement of the `TypeUse` annotation issue. In this case when we copy annotations from the record, the target of the annotation will be different than `ElementType.RECORD_COMPONENT` or `ElementType.TYPE_USE`, etc. Ensure that the annotation has a compatible `@Target` when adding. Added a test record for this as well provided by @facboy Fixes #258
92d276c to
1ecb3a7
Compare
Contributor
|
i can see it fixes the compilation error. technically you can add the annotation, it just has to be added to the inner type, e.g. |
Owner
Author
I tried getting that to work in the previous PR and it never worked correctly. Let's go with this for now. |
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 is further refinement of the
TypeUseannotation issue. In this case when we copy annotations from the record that target of the annotation will be different thanElementType.RECORD_COMPONENTorElementType.TYPE_USE, etc. Ensure that the annotation has a compatible@Targetwhen adding.Added a test record for this as well provided by @facboy
Fixes #258