Skip to content

Commit 1c05a9a

Browse files
committed
Avoid tuples
1 parent f908e75 commit 1c05a9a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,13 @@ object PatternMatcher {
219219
case Nil => matchArgsPatternPlan(args, syms.reverse)
220220
}
221221
def matchArgsPatternPlan(args: List[Tree], syms: List[Symbol]): Plan =
222-
((args, syms): @unchecked) match { // both lists should always have the same size
223-
case (arg :: args1, sym :: syms1) => patternPlan(sym, arg, matchArgsPatternPlan(args1, syms1), onFailure)
224-
case (Nil, Nil) => onSuccess
222+
args match {
223+
case arg :: args1 =>
224+
val sym :: syms1 = syms
225+
patternPlan(sym, arg, matchArgsPatternPlan(args1, syms1), onFailure)
226+
case Nil =>
227+
assert(syms.isEmpty)
228+
onSuccess
225229
}
226230
matchArgsSelectorsPlan(selectors, Nil)
227231
}

0 commit comments

Comments
 (0)