Skip to content

Commit 797928f

Browse files
committed
1 parent c5f280d commit 797928f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ object desugar {
16181618
if gen.checkMode == GenCheckMode.FilterAlways then // pattern was prefixed by `case`
16191619
false
16201620
else
1621-
gen.checkMode != GenCheckMode.FilterNow
1621+
gen.checkMode == GenCheckMode.Ignore
16221622
|| isVarBinding(gen.pat)
16231623
|| isIrrefutable(gen.pat, gen.expr)
16241624

compiler/test-resources/repl/i14626

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// scalac: -source:future
2+
scala> for (a, b) <- List("a","b","c").lazyZip(List(1,2,3)) do println(s"$a$b")
3+
a1
4+
b2
5+
c3

0 commit comments

Comments
 (0)