We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d24eaa commit c3a0acbCopy full SHA for c3a0acb
compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -457,6 +457,12 @@ object PatternMatcher {
457
apply(initializer(plan.sym))
458
plan
459
}
460
+ override def apply(plan: SeqPlan): Plan = {
461
+ apply(plan.head)
462
+ if (canFallThrough(plan.head))
463
+ apply(plan.tail)
464
+ plan
465
+ }
466
467
refCounter(plan)
468
refCounter.count
@@ -597,6 +603,16 @@ object PatternMatcher {
597
603
598
604
599
605
606
607
+ val newHead = apply(plan.head)
608
+ if (!canFallThrough(newHead))
609
+ newHead
610
+ else {
611
+ plan.head = newHead
612
+ plan.tail = apply(plan.tail)
613
614
615
600
616
601
617
Inliner(plan)
602
618
0 commit comments