diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-12-03 16:52:00 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-12-03 16:52:00 +0000 |
commit | c8107b0d95890b29ffebe101fc54ce0885511de4 (patch) | |
tree | 5ab6b29e313861f1ca3824485184bd7412b9fcc5 /test | |
parent | c3c87411ce473b7f1f2e9638d682adbf27ea8b49 (diff) | |
download | scala-c8107b0d95890b29ffebe101fc54ce0885511de4.tar.gz scala-c8107b0d95890b29ffebe101fc54ce0885511de4.tar.bz2 scala-c8107b0d95890b29ffebe101fc54ce0885511de4.zip |
Fixed #1358.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/lazy-locals.check | 1 | ||||
-rw-r--r-- | test/files/run/lazy-locals.scala | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/lazy-locals.check b/test/files/run/lazy-locals.check index 08d99562c2..63beca0717 100644 --- a/test/files/run/lazy-locals.check +++ b/test/files/run/lazy-locals.check @@ -81,3 +81,4 @@ forced lazy val t at n = 5 1764 First 5 elements of ones: List(1, 1, 1, 1, 1) I am initialized when the constructor is run +false diff --git a/test/files/run/lazy-locals.scala b/test/files/run/lazy-locals.scala index 324f7c00e4..000f4d2faf 100644 --- a/test/files/run/lazy-locals.scala +++ b/test/files/run/lazy-locals.scala @@ -133,6 +133,11 @@ object Test extends Application { () } + def testReturnInLazyVal: Boolean = { + lazy val go = { return false } + go + } + { lazy val inCtor = "I am initialized when the constructor is run" inCtor @@ -155,4 +160,5 @@ object Test extends Application { println(testLazyRecMany(5)) testRecVal new CtorBlock + println(testReturnInLazyVal) } |