File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2447,7 +2447,13 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
2447
2447
// wrt to operand order for `&`, we include the explicit subtype test here.
2448
2448
// See also #5649.
2449
2449
then body1.tpe
2450
- else pt & body1.tpe
2450
+ else body1.tpe match
2451
+ case btpe : TypeRef
2452
+ if btpe.symbol == defn.TupleXXLClass && pt.tupleElementTypes.isDefined =>
2453
+ // leave the original tuple type; don't mix with & TupleXXL which would only obscure things
2454
+ pt
2455
+ case _ =>
2456
+ pt & body1.tpe
2451
2457
val sym = newPatternBoundSymbol(name, symTp, tree.span)
2452
2458
if (pt == defn.ImplicitScrutineeTypeRef || tree.mods.is(Given )) sym.setFlag(Given )
2453
2459
if (ctx.mode.is(Mode .InPatternAlternative ))
You can’t perform that action at this time.
0 commit comments