diff options
author | Martin Odersky <odersky@gmail.com> | 2011-04-11 07:01:55 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-04-11 07:01:55 +0000 |
commit | 886e0a6a1c5623337e0362bd37fc4a2d82887675 (patch) | |
tree | d3793ee0875e6a4e92ddc8709e2e6a481c97b78a /test/files/run | |
parent | 659f8ba6734439a411e911f0be0b2f4c152c4d1e (diff) | |
download | scala-886e0a6a1c5623337e0362bd37fc4a2d82887675.tar.gz scala-886e0a6a1c5623337e0362bd37fc4a2d82887675.tar.bz2 scala-886e0a6a1c5623337e0362bd37fc4a2d82887675.zip |
Closes #4396. No review.
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) +} |