diff options
Diffstat (limited to 'test/files/run/lazy-locals.scala')
-rw-r--r-- | test/files/run/lazy-locals.scala | 17 |
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 } |