Skip to content

Commit e992cf9

Browse files
committed
Merge pull request #197 from dotty-staging/fix/tailrec-defdef
Fix #196. Errorneus tail-optimization of inner DefDef's
2 parents 7eaee33 + ddf57c9 commit e992cf9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/transform/TailRec.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
311311

312312
case Return(expr, from) =>
313313
tpd.cpy.Return(tree)(noTailTransform(expr), from)
314-
314+
case t: DefDef =>
315+
t // todo: could improve to handle DefDef's with a label flag calls to which are in tail position
315316
case _ =>
316317
super.transform(tree)
317318
}

0 commit comments

Comments
 (0)