summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-15 12:08:42 -0800
committerPaul Phillips <paulp@improving.org>2013-01-15 12:08:42 -0800
commit6f3ea77870ab5e17805ef0fc338c251e87870b8c (patch)
treedee9b5a1cd15f1f6d346b36551f9dff47a6e0c68 /src
parent621f7a56c21686ebbd39b8ffe9282f917fe1f128 (diff)
parent9cc61f310ef5f80e598956bee20156b7bc472e84 (diff)
downloadscala-6f3ea77870ab5e17805ef0fc338c251e87870b8c.tar.gz
scala-6f3ea77870ab5e17805ef0fc338c251e87870b8c.tar.bz2
scala-6f3ea77870ab5e17805ef0fc338c251e87870b8c.zip
Merge pull request #1892 from retronym/ticket/6479
SI-6479 Don't lift try exprs in label arguments.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index ff08fe4ffa..9908bd689e 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -621,11 +621,13 @@ abstract class UnCurry extends InfoTransform
case Apply(fn, args) =>
if (fn.symbol == Object_synchronized && shouldBeLiftedAnyway(args.head))
transform(treeCopy.Apply(tree, fn, List(liftTree(args.head))))
- else
- withNeedLift(true) {
+ else {
+ val needLift = needTryLift || !fn.symbol.isLabel // SI-6749, no need to lift in args to label jumps.
+ withNeedLift(needLift) {
val formals = fn.tpe.paramTypes
treeCopy.Apply(tree, transform(fn), transformTrees(transformArgs(tree.pos, fn.symbol, args, formals)))
}
+ }
case Assign(Select(_, _), _) =>
withNeedLift(true) { super.transform(tree) }