summaryrefslogtreecommitdiff
path: root/test/files/run/t3980.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-11-09 11:04:39 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-11-09 11:04:39 +0000
commit903478337c9b83ea9317d1dab311c62f654a7a45 (patch)
tree14192efa703e5b7bfbe8d51fed0f1b7d2a2f64c3 /test/files/run/t3980.scala
parente46a39797744d1fb4bda637f31034be5d25a6338 (diff)
downloadscala-903478337c9b83ea9317d1dab311c62f654a7a45.tar.gz
scala-903478337c9b83ea9317d1dab311c62f654a7a45.tar.bz2
scala-903478337c9b83ea9317d1dab311c62f654a7a45.zip
Closes #3980. Review by dragos.
Diffstat (limited to 'test/files/run/t3980.scala')
-rw-r--r--test/files/run/t3980.scala19
1 files changed, 19 insertions, 0 deletions
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