From 02e260a8e67e2b2b6f876aafe76cd61248a89374 Mon Sep 17 00:00:00 2001 From: Szabolcs Berecz Date: Tue, 28 Feb 2012 22:35:53 +0100 Subject: Fixes SI-5380: non-local return of try expression --- src/compiler/scala/tools/nsc/transform/UnCurry.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index b9b115b7c8..0e6f96fb07 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -551,6 +551,9 @@ abstract class UnCurry extends InfoTransform case Assign(lhs, _) if lhs.symbol.owner != currentMethod || lhs.symbol.hasFlag(LAZY | ACCESSOR) => withNeedLift(true) { super.transform(tree) } + case Return(_) => + withNeedLift(true) { super.transform(tree) } + case Try(block, catches, finalizer) => if (needTryLift || shouldBeLiftedAnyway(tree)) transform(liftTree(tree)) else super.transform(tree) -- cgit v1.2.3