summaryrefslogtreecommitdiff
path: root/test/files/run/t3980.scala
diff options
context:
space:
mode:
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