summaryrefslogtreecommitdiff
path: root/test/files/run/lazy-locals.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2008-06-03 10:13:48 +0000
committerIulian Dragos <jaguarul@gmail.com>2008-06-03 10:13:48 +0000
commita7f12d2e14eabf0a915e2b306f5a624012c239fe (patch)
tree006964110166b9ed3e7eac86b1dea8b91900ae6a /test/files/run/lazy-locals.scala
parentba33786e9b0247bc8c796dddbbed1c69905c667e (diff)
downloadscala-a7f12d2e14eabf0a915e2b306f5a624012c239fe.tar.gz
scala-a7f12d2e14eabf0a915e2b306f5a624012c239fe.tar.bz2
scala-a7f12d2e14eabf0a915e2b306f5a624012c239fe.zip
Fixed #948.
Diffstat (limited to 'test/files/run/lazy-locals.scala')
-rw-r--r--test/files/run/lazy-locals.scala17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/files/run/lazy-locals.scala b/test/files/run/lazy-locals.scala
index 937b5a80c0..324f7c00e4 100644
--- a/test/files/run/lazy-locals.scala
+++ b/test/files/run/lazy-locals.scala
@@ -133,11 +133,26 @@ object Test extends Application {
()
}
+ {
+ lazy val inCtor = "I am initialized when the constructor is run"
+ inCtor
+ }
+
+ class CtorBlock {
+ {
+ lazy val inCtor = {
+ println("I am initialized when the constructor is run")
+ 42
+ }
+ inCtor
+ }
+ }
+
println(testLazy)
testLazy32
testLazy33
println(testLazyRec(5))
println(testLazyRecMany(5))
testRecVal
-
+ new CtorBlock
}