From ac6504b8c43b83e43072d76d9a6fae0993f88d8e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 26 May 2013 19:09:19 -0700 Subject: 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. --- src/compiler/scala/tools/nsc/transform/Constructors.scala | 8 ++++---- 1 file 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) -- cgit v1.2.3