summaryrefslogtreecommitdiff
path: root/test/files/run/t4396.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t4396.scala')
-rw-r--r--test/files/run/t4396.scala18
1 files changed, 18 insertions, 0 deletions
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)
+}