aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/LiftTry.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-11 11:49:40 +0200
committerGitHub <noreply@github.com>2017-04-11 11:49:40 +0200
commit579571e05a08120133173933e7eaf2555846d1d7 (patch)
tree7b0c89291126e89a901a8ab1230f874e26e25515 /compiler/src/dotty/tools/dotc/transform/LiftTry.scala
parent4ff656138a2e4e127b763adeee3f0f72d515f6b6 (diff)
parent87608bded1fb23519a829fa7f6ee14d4b6a515dc (diff)
downloaddotty-579571e05a08120133173933e7eaf2555846d1d7.tar.gz
dotty-579571e05a08120133173933e7eaf2555846d1d7.tar.bz2
dotty-579571e05a08120133173933e7eaf2555846d1d7.zip
Merge pull request #2128 from dotty-staging/add-semantic-names
Delay name mangling
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/LiftTry.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/LiftTry.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/LiftTry.scala b/compiler/src/dotty/tools/dotc/transform/LiftTry.scala
index d01195614..278868131 100644
--- a/compiler/src/dotty/tools/dotc/transform/LiftTry.scala
+++ b/compiler/src/dotty/tools/dotc/transform/LiftTry.scala
@@ -8,6 +8,7 @@ import core.Contexts._
import core.Types._
import core.Flags._
import core.Decorators._
+import core.NameKinds.LiftedTreeName
import NonLocalReturns._
/** Lifts try's that might be executed on non-empty expression stacks
@@ -56,7 +57,7 @@ class LiftTry extends MiniPhase with IdentityDenotTransformer { thisTransform =>
if (needLift) {
ctx.debuglog(i"lifting tree at ${tree.pos}, current owner = ${ctx.owner}")
val fn = ctx.newSymbol(
- ctx.owner, ctx.freshName("liftedTree").toTermName, Synthetic | Method,
+ ctx.owner, LiftedTreeName.fresh(), Synthetic | Method,
MethodType(Nil, tree.tpe.widenIfUnstable), coord = tree.pos)
tree.changeOwnerAfter(ctx.owner, fn, thisTransform)
Block(DefDef(fn, tree) :: Nil, ref(fn).appliedToNone)