diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-26 19:09:19 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-26 19:13:01 -0700 |
commit | ac6504b8c43b83e43072d76d9a6fae0993f88d8e (patch) | |
tree | e35cc8091b97b27bcc07e716a341a44476d65c39 | |
parent | 41073f8db662906ada4b779f199ea6d5f4bd5e1f (diff) | |
download | scala-ac6504b8c43b83e43072d76d9a6fae0993f88d8e.tar.gz scala-ac6504b8c43b83e43072d76d9a6fae0993f88d8e.tar.bz2 scala-ac6504b8c43b83e43072d76d9a6fae0993f88d8e.zip |
Temporary reversion of a bit of d8b96bb858.
If I reverse these few lines, I can rebase miguel's
pull request cleanly; if I don't, git thinks there are
enough merge conflicts to start a war. Something is
suboptimal in that algorithm.
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Constructors.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index 385bf2dade..5079108c27 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -165,7 +165,7 @@ abstract class Constructors extends Transform with ast.TreeDSL { from.tpe.typeSymbol.isPrimitiveValueClass) result else localTyper.typedPos(to.pos) { // `throw null` has the same effect as `throw new NullPointerException`, see JVM spec on instruction `athrow` - IF (from OBJ_EQ NULL) THEN Throw(gen.mkZero(ThrowableTpe)) ELSE result + IF (from OBJ_EQ NULL) THEN Throw(gen.mkZero(ThrowableClass.tpe)) ELSE result } } @@ -469,10 +469,10 @@ abstract class Constructors extends Transform with ast.TreeDSL { val methodName = currentUnit.freshTermName("delayedEndpoint$" + clazz.fullNameAsName('$').toString + "$") val methodSym = clazz.newMethod(methodName, impl.pos, SYNTHETIC | FINAL) - methodSym setInfoAndEnter MethodType(Nil, UnitTpe) + methodSym setInfoAndEnter MethodType(Nil, UnitClass.tpe) // changeOwner needed because the `stats` contained in the DefDef were owned by the template, not long ago. - val blk = Block(stats, gen.mkZero(UnitTpe)).changeOwner(impl.symbol -> methodSym) + val blk = Block(stats, gen.mkZero(UnitClass.tpe)).changeOwner(impl.symbol -> methodSym) val delayedDD = localTyper typed { DefDef(methodSym, Nil, blk) } delayedDD.asInstanceOf[DefDef] @@ -495,7 +495,7 @@ abstract class Constructors extends Transform with ast.TreeDSL { val applyMethod: MethodSymbol = ( closureClass newMethod(nme.apply, impl.pos, FINAL) - setInfoAndEnter MethodType(Nil, ObjectTpe) + setInfoAndEnter MethodType(Nil, ObjectClass.tpe) ) val outerFieldDef = ValDef(outerField) val closureClassTyper = localTyper.atOwner(closureClass) |