scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

A comprehension with valdef aliases is never a candidate for map elimination.

Open som-snytt opened this issue 5 months ago • 4 comments

A comprehension with valdef aliases is never a candidate for map elimination. Previously, desugar would compare the body written by the user and not the body with a prefix of patdefs; that comparison must always fail.

Use the previous commit that slightly simplifies the pattern match in makeFor. There is a single case for "generator followed by alias", and the body of the case handles either better fors or legacy.

Fixes #24673

som-snytt avatar Jun 28 '25 21:06 som-snytt