From 903478337c9b83ea9317d1dab311c62f654a7a45 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Tue, 9 Nov 2010 11:04:39 +0000 Subject: Closes #3980. Review by dragos. --- test/files/run/t3980.check | 3 +++ test/files/run/t3980.scala | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/files/run/t3980.check create mode 100644 test/files/run/t3980.scala (limited to 'test') diff --git a/test/files/run/t3980.check b/test/files/run/t3980.check new file mode 100644 index 0000000000..8bb03f18bb --- /dev/null +++ b/test/files/run/t3980.check @@ -0,0 +1,3 @@ +once +2 +2 diff --git a/test/files/run/t3980.scala b/test/files/run/t3980.scala new file mode 100644 index 0000000000..c140176ce4 --- /dev/null +++ b/test/files/run/t3980.scala @@ -0,0 +1,19 @@ +object A { + def run1 { + lazy val x: Unit = {(); println("once")} + x + x + } + def run2 { + lazy val y: Int = 2 + println(y) + println(y) + } +} + +object Test { + def main(args: Array[String]) = { + A.run1 + A.run2 + } +} \ No newline at end of file -- cgit v1.2.3