diff --git a/test/files/run/t4072.flags b/test/files/run/t4072.flags new file mode 100644 index 000000000..ae0844605 --- /dev/null +++ b/test/files/run/t4072.flags @@ -0,0 +1 @@ +-Xcheckinit \ No newline at end of file diff --git a/test/files/run/t4072.scala b/test/files/run/t4072.scala new file mode 100644 index 000000000..872072a4c --- /dev/null +++ b/test/files/run/t4072.scala @@ -0,0 +1,13 @@ +import scala.tools.nsc._ + +object Test { + class DryRun { + val compiler = new Global(new Settings()) { + lazy val test1 = new AnyRef + } + } + + def main(args: Array[String]) { + new DryRun().compiler.test1 + } +}