File tree 1 file changed +3
-3
lines changed
src/dotty/tools/dotc/transform 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -464,7 +464,8 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
464
464
// all potentially stored subpat binders
465
465
val potentiallyStoredBinders = stored.unzip._1.toSet
466
466
// compute intersection of all symbols in the tree `in` and all potentially stored subpat binders
467
- new DeepFolder [Unit ]((x : Unit , t: Tree ) => if (potentiallyStoredBinders(t.symbol)) usedBinders += t.symbol).apply((), in)
467
+ new DeepFolder [Unit ]((x : Unit , t: Tree ) =>
468
+ if (potentiallyStoredBinders(t.symbol)) usedBinders += t.symbol).apply((), in)
468
469
469
470
if (usedBinders.isEmpty) in
470
471
else {
@@ -1440,9 +1441,8 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
1440
1441
// require (nbSubPats > 0 && (!lastIsStar || isSeq))
1441
1442
protected def subPatRefs (binder : Symbol ): List [Tree ] = {
1442
1443
val refs = if (totalArity > 0 && isSeq) subPatRefsSeq(binder)
1443
- else if (defn.isProductSubType(binder.info) ) productElemsToN(binder, totalArity)
1444
+ else if (totalArity > 1 && ! isSeq ) productElemsToN(binder, totalArity)
1444
1445
else ref(binder):: Nil
1445
- val refsSymbols = refs.map(_.symbol) // just for debugging
1446
1446
refs
1447
1447
}
1448
1448
You can’t perform that action at this time.
0 commit comments