summaryrefslogtreecommitdiff
path: root/test/files/run/t5552.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t5552.scala')
-rw-r--r--test/files/run/t5552.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/files/run/t5552.scala b/test/files/run/t5552.scala
index afb8a1f0be..5b717f9e13 100644
--- a/test/files/run/t5552.scala
+++ b/test/files/run/t5552.scala
@@ -1,10 +1,14 @@
class C[@specialized(Int) A](a:A) {
- lazy val b = (a, a)
+ lazy val b = {println(s"lazy: $a"); (a, a)} // there should only be two instances of "lazy" in the output
def c = b
}
object Test {
def main(args:Array[String]) {
- println(new C(3).c)
- println(new C(3.0).c)
+ val cInt = new C(3)
+ println(cInt.c)
+ println(cInt.c)
+ val cFloat = new C(3.0)
+ println(cFloat.c)
+ println(cFloat.c)
}
}