diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-09 11:04:39 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-09 11:04:39 +0000 |
commit | 903478337c9b83ea9317d1dab311c62f654a7a45 (patch) | |
tree | 14192efa703e5b7bfbe8d51fed0f1b7d2a2f64c3 /test/files | |
parent | e46a39797744d1fb4bda637f31034be5d25a6338 (diff) | |
download | scala-903478337c9b83ea9317d1dab311c62f654a7a45.tar.gz scala-903478337c9b83ea9317d1dab311c62f654a7a45.tar.bz2 scala-903478337c9b83ea9317d1dab311c62f654a7a45.zip |
Closes #3980. Review by dragos.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t3980.check | 3 | ||||
-rw-r--r-- | test/files/run/t3980.scala | 19 |
2 files changed, 22 insertions, 0 deletions
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 |