summaryrefslogtreecommitdiff
path: root/test/files/run/t4697.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t4697.scala')
-rw-r--r--test/files/run/t4697.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/t4697.scala b/test/files/run/t4697.scala
new file mode 100644
index 0000000000..95592172e0
--- /dev/null
+++ b/test/files/run/t4697.scala
@@ -0,0 +1,8 @@
+object Test {
+ var st = Stream(0)
+ for (i <- 1 to 10000) st = i +: st
+
+ def main(args: Array[String]): Unit = {
+ println(st.take(10000).sum)
+ }
+}