From c8f4316b374d78caaf5ba605cd34e323b78a77de Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 10 Jun 2011 22:38:17 +0000 Subject: A test case demonstrating some of the issues wi... A test case demonstrating some of the issues with DelayedInit. References #4680. Review by odersky. --- src/compiler/scala/tools/nsc/transform/Constructors.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index c1efe4843d..6ea6f9c4d6 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -556,6 +556,13 @@ abstract class Constructors extends Transform with ast.TreeDSL { var (uptoSuperStats, remainingConstrStats) = splitAtSuper(constrStatBuf.toList) + /** XXX This is not corect: remainingConstrStats.nonEmpty excludes too much, + * but excluding it includes too much. The constructor sequence being mimicked + * needs to be reproduced with total fidelity. + * + * See test case files/run/bug4680.scala, the output of which is wrong in many + * particulars. + */ val needsDelayedInit = (clazz isSubClass DelayedInitClass) /*&& !(defBuf exists isInitDef)*/ && remainingConstrStats.nonEmpty -- cgit v1.2.3