Allow compatible type when targetting object types in linter#53
Open
Lulu13022002 wants to merge 2 commits into
Open
Allow compatible type when targetting object types in linter#53Lulu13022002 wants to merge 2 commits into
Lulu13022002 wants to merge 2 commits into
Conversation
|
I don't fully understand this change yet but I find it concerning that that test has been removed, that's an important check. Also, the spec does not allow for CharSequence to be unpicked, so it's a spec issue -- see the bullet point on compatible types in the targets section. Maybe something can be added to the spec about CharSequence specifically, and then we can solve this. |
Author
|
CharSequence is still not allowed as a group data type and will fails in the parser. This expand the later check to allow CharSequence to be used in target definitions (when the declared group is a String). But it's not specific to CharSequence the example provided in the linked issue should work for Object/Serializable and whatever type fitting a String. |
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.
Closes #50
This removes the unpickable type check and instead just check for compatible usage later which allow to not fail at the first linter issue. It might be interesting to extend this to support primitive too with their boxed equivalent later.
It effectively now match the implementation which never really respected this part of the specs: https://github.com/Vineflower/unpick-parser/blob/main/spec.md#targets
I didn't find any jdk/asm example for the target_field test so that is still pending.