diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/AddInterfaces.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala index 0179580e05..815b36b361 100644 --- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala +++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala @@ -292,8 +292,10 @@ abstract class AddInterfaces extends InfoTransform { yield mixinConstructorCall(implClass(mc)) } (tree: @unchecked) match { - case Block(supercall :: stats, expr) => - copy.Block(tree, supercall :: mixinConstructorCalls ::: stats, expr) + case Block(stats, expr) => + val (presuper, supercall :: rest) = stats span (_.symbol.hasFlag(PRESUPER)) + //assert(supercall.symbol.isClassConstructor, supercall) + copy.Block(tree, presuper ::: (supercall :: mixinConstructorCalls ::: rest), expr) } } |