diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t4396.check | 4 | ||||
-rw-r--r-- | test/files/run/t4396.scala | 18 |
2 files changed, 22 insertions, 0 deletions
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) +} |