Skip to content

Commit 2584ffe

Browse files
committed
The tree type is the tuple type
1 parent 4e2eb6f commit 2584ffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ object PatternMatcher {
342342
case tp => tp
343343
!defn.isTupleNType(tp)
344344
}
345-
val components = if isGenericTuple then caseAccessors.indices.toList.map(tupleApp(unapp.tpe.finalResultType, _, ref(scrutinee))) else caseAccessors.map(tupleSel)
345+
val components = if isGenericTuple then caseAccessors.indices.toList.map(tupleApp(tree.tpe.dealias, _, ref(scrutinee))) else caseAccessors.map(tupleSel)
346346
matchArgsPlan(components, args, onSuccess)
347347
else if (unapp.tpe <:< (defn.BooleanType))
348348
TestPlan(GuardTest, unapp, unapp.span, onSuccess)

0 commit comments

Comments
 (0)