summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-03-24 12:18:08 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-03-24 12:18:08 +1000
commit7741d3f0a37bb673462863ba389c27ce6eccaccf (patch)
treeab1769861fba7135366b5484b8824fa7c812ff8b /test
parenteb05bea0f768d237946d1862b33817ed93661952 (diff)
parent8e0a386508d6cb655db0a29a23fb26170b262548 (diff)
downloadscala-7741d3f0a37bb673462863ba389c27ce6eccaccf.tar.gz
scala-7741d3f0a37bb673462863ba389c27ce6eccaccf.tar.bz2
scala-7741d3f0a37bb673462863ba389c27ce6eccaccf.zip
Merge pull request #4381 from khernyo/issue/9219
SI-9219 Stream toString returns unexpected result
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t9219.check3
-rw-r--r--test/files/run/t9219.scala11
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t9219.check b/test/files/run/t9219.check
new file mode 100644
index 0000000000..3509ece003
--- /dev/null
+++ b/test/files/run/t9219.check
@@ -0,0 +1,3 @@
+Stream(1, 2, ?)
+Stream(1, 2, 3, 4, ?)
+Stream(1, 2, 3, 4, 5, 6, ?)
diff --git a/test/files/run/t9219.scala b/test/files/run/t9219.scala
new file mode 100644
index 0000000000..c15f55faac
--- /dev/null
+++ b/test/files/run/t9219.scala
@@ -0,0 +1,11 @@
+object Test extends App {
+ def check[U](f: Stream[Int] => U) = {
+ val s = Stream.from(1)
+ f(s)
+ println(s)
+ }
+
+ check(_.tail)
+ check(_.take(4).force)
+ check(_(5))
+}