diff options
author | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-28 22:35:53 +0100 |
---|---|---|
committer | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-28 22:53:39 +0100 |
commit | 02e260a8e67e2b2b6f876aafe76cd61248a89374 (patch) | |
tree | 87a6f2733764c5cccd70bc7df6e87560496c46b9 /src | |
parent | 4ab3600298de995e7de6d5cfdce73e0f278341e2 (diff) | |
download | scala-02e260a8e67e2b2b6f876aafe76cd61248a89374.tar.gz scala-02e260a8e67e2b2b6f876aafe76cd61248a89374.tar.bz2 scala-02e260a8e67e2b2b6f876aafe76cd61248a89374.zip |
Fixes SI-5380: non-local return of try expression
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 3 |
1 files changed, 3 insertions, 0 deletions
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) |