summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/CleanUp.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/CleanUp.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/CleanUp.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
index 095ea88a72..7a0a8946f9 100644
--- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala
+++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
@@ -710,10 +710,8 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
treeCopy.DefDef(ctor, mods, name, tparams, vparamss, tpt, newBlock)
case None =>
// create new static ctor
- val staticCtorSym = currentClass.newConstructor(template.pos)
- .setFlag(STATIC)
- .setInfo(UnitClass.tpe)
- val rhs = Block(newStaticInits.toList, Literal(Constant()))
+ val staticCtorSym = currentClass.newStaticConstructor(template.pos)
+ val rhs = Block(newStaticInits.toList, Literal(Constant()))
val staticCtorTree = DefDef(staticCtorSym, rhs)
localTyper.typed { atPos(template.pos)(staticCtorTree) }
}