summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-09-17 00:16:33 +0000
committerPaul Phillips <paulp@improving.org>2010-09-17 00:16:33 +0000
commit99fb2b420f2fbf0eca5a98d0e52f8c6b580cd18f (patch)
treed86f3e56692a99769e88149a1eb4a621b968bf41 /test/files/run
parent4fe2d213ce613cf88d30b7ff1285cd74d4e32942 (diff)
downloadscala-99fb2b420f2fbf0eca5a98d0e52f8c6b580cd18f.tar.gz
scala-99fb2b420f2fbf0eca5a98d0e52f8c6b580cd18f.tar.bz2
scala-99fb2b420f2fbf0eca5a98d0e52f8c6b580cd18f.zip
Does what can probably be done about strange it...
Does what can probably be done about strange iterator exhaustion behavior. Maybe we should start thinking about iteratees... Closes #3760, no review.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/bug3760.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/bug3760.scala b/test/files/run/bug3760.scala
new file mode 100644
index 0000000000..b78406824e
--- /dev/null
+++ b/test/files/run/bug3760.scala
@@ -0,0 +1,17 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ {
+ val it = Iterable(1,2).iterator
+ val xs = it.toList
+
+ assert(it.isEmpty)
+ }
+
+ {
+ val it = Iterator(1, 2)
+ val xs = it.toStream.toList
+
+ assert(it.isEmpty)
+ }
+ }
+}