From c8107b0d95890b29ffebe101fc54ce0885511de4 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Wed, 3 Dec 2008 16:52:00 +0000 Subject: Fixed #1358. --- test/files/run/lazy-locals.check | 1 + test/files/run/lazy-locals.scala | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'test/files/run') 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) } -- cgit v1.2.3