@@ -325,7 +325,7 @@ object PatternMatcher {
325
325
def isSyntheticScala2Unapply (sym : Symbol ) =
326
326
sym.isAllOf(SyntheticCase ) && sym.owner.is(Scala2x )
327
327
328
- def tupleApp (i : Int , receiver : Tree ) = // manually inlining the call to NonEmptyTuple#apply, because it's an inline method
328
+ def tupleApp (i : Int , receiver : => Tree ) = // manually inlining the call to NonEmptyTuple#apply, because it's an inline method
329
329
ref(defn.RuntimeTuplesModule )
330
330
.select(defn.RuntimeTuples_apply )
331
331
.appliedTo(receiver, Literal (Constant (i)))
@@ -346,16 +346,16 @@ object PatternMatcher {
346
346
.map(ref(unappResult).select(_))
347
347
matchArgsPlan(selectors, args, onSuccess)
348
348
}
349
- else if unappResult.info <:< defn.NonEmptyTupleTypeRef then
350
- val components = (0 until foldApplyTupleType(unappResult.denot.info).length).toList.map(tupleApp(_, ref(unappResult)))
351
- matchArgsPlan(components, args, onSuccess)
352
349
else if (isUnapplySeq && isProductSeqMatch(unapp.tpe.widen, args.length, unapp.srcPos)) {
353
350
val arity = productArity(unapp.tpe.widen, unapp.srcPos)
354
351
unapplyProductSeqPlan(unappResult, args, arity)
355
352
}
356
353
else if (isUnapplySeq && unapplySeqTypeElemTp(unapp.tpe.widen.finalResultType).exists) {
357
354
unapplySeqPlan(unappResult, args)
358
355
}
356
+ else if unappResult.info <:< defn.NonEmptyTupleTypeRef then
357
+ val components = (0 until foldApplyTupleType(unappResult.denot.info).length).toList.map(tupleApp(_, ref(unappResult)))
358
+ matchArgsPlan(components, args, onSuccess)
359
359
else {
360
360
assert(isGetMatch(unapp.tpe))
361
361
val argsPlan = {
0 commit comments