From 886e0a6a1c5623337e0362bd37fc4a2d82887675 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 11 Apr 2011 07:01:55 +0000 Subject: Closes #4396. No review. --- test/files/run/t4396.check | 4 ++++ test/files/run/t4396.scala | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/files/run/t4396.check create mode 100644 test/files/run/t4396.scala (limited to 'test/files') diff --git a/test/files/run/t4396.check b/test/files/run/t4396.check new file mode 100644 index 0000000000..b0b4014430 --- /dev/null +++ b/test/files/run/t4396.check @@ -0,0 +1,4 @@ +hallo +constructor +out:22 +bye diff --git a/test/files/run/t4396.scala b/test/files/run/t4396.scala new file mode 100644 index 0000000000..9911f323a5 --- /dev/null +++ b/test/files/run/t4396.scala @@ -0,0 +1,18 @@ +trait M extends DelayedInit { + def delayedInit(body : => Unit) { + println("hallo") + body + println("bye") + } +} + +class C(init : Int) extends M { + def foo = init + println("constructor") + var x = init + println("out:"+x) +} + +object Test extends App { + new C(22) +} -- cgit v1.2.3