Skip to content

Commit bea0935

Browse files
committed
Space: Avoid using return, so trace is easier to force
1 parent efe52bd commit bea0935

File tree

1 file changed

+4
-2
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,11 @@ trait SpaceLogic {
269269
tryDecompose2(tp2)
270270
else
271271
a
272+
case (Prod(tp1, fun1, ss1), Prod(tp2, fun2, ss2))
273+
if (!isSameUnapply(fun1, fun2)) => a
274+
case (Prod(tp1, fun1, ss1), Prod(tp2, fun2, ss2))
275+
if (fun1.symbol.name == nme.unapply && ss1.length != ss2.length) => a
272276
case (Prod(tp1, fun1, ss1), Prod(tp2, fun2, ss2)) =>
273-
if (!isSameUnapply(fun1, fun2)) return a
274-
if (fun1.symbol.name == nme.unapply && ss1.length != ss2.length) return a
275277

276278
val range = (0 until ss1.size).toList
277279
val cache = Array.fill[Space | Null](ss2.length)(null)

0 commit comments

Comments
 (0)