Handle named args in pattern matching - #465
Open
Krever wants to merge 3 commits into
Open
Conversation
Author
|
Hey @sjrd, could you take a look maybe? |
sjrd
requested changes
Jul 20, 2026
| // Named extractor patterns (e.g., `case Foo(field = value)`) wrap sub-patterns in NAMEDARG; discard the name | ||
| reader.readByte() | ||
| readUnsignedName() | ||
| readPattern |
Contributor
There was a problem hiding this comment.
This entirely discards the name. That does not seem right. If the info is in TASTy, we should surface it in the tasty-query tree.
Author
There was a problem hiding this comment.
Good catch, I added the tree node to carry the name. Is that what you meant?
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.
Hey 👋 I spotted the bug in one of my projects and asked Claude to fix it.
Disclaimer: I have zero clue about the bigger picture here, let me know if there is more that should be considered in fixing this. (The test I added fails without the fix)