Handle Typed(_: SubMatch) in PatternMatcher#25904
Handle Typed(_: SubMatch) in PatternMatcher#25904EugeneFlesselle wants to merge 3 commits intoscala:mainfrom
Typed(_: SubMatch) in PatternMatcher#25904Conversation
There was a problem hiding this comment.
That was my first attempt and I think this change can be simplified - I don't see why we need to convert the value to a method?
Edit: Okkk now I see, sorry (It's already 6 p.m., a little late) :)
Edit2: My first attempt was only to add one case:
case Typed(t: SubMatch, _) => subMatchPlan(t)so I didn't need to change the value to a method - but your solution looks a way better.
Did this approach cause issues, which led to the alternative fix?
So the logic is applied recursively |
This fix felt like a band-aid at first. I was also not sure if just stripping the |
Based on #25778 by @zielinsky
Fixes #25746
Strip
Typed(_, _)proxies aroundSubMatches when computing pattern plan in PatternMatcher.How much have you relied on LLM-based tools in this contribution?
Not at all
How was the solution tested?
Covered by existing tests from #25778