summaryrefslogtreecommitdiff
path: root/test/files/run/t498.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t498.scala')
-rw-r--r--test/files/run/t498.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/t498.scala b/test/files/run/t498.scala
new file mode 100644
index 0000000000..50be317c4c
--- /dev/null
+++ b/test/files/run/t498.scala
@@ -0,0 +1,5 @@
+object Test extends Application {
+// the function passed to flatMap produces lots of empty streams, but this should not overflow the stack
+ val res = Stream.from(1).flatMap(i => if (i < 3000) Stream.empty else List(1))
+ println(res take 42 force)
+} \ No newline at end of file