summaryrefslogtreecommitdiff
path: root/test/files/run/t5201.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-05-08 21:09:25 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-05-08 21:09:25 -0400
commita516098d4ed774c5ff4f53ef22ed8eb90dc1b8d5 (patch)
treedc83defdc922a580170a5d49529a9db4b0a7b8b4 /test/files/run/t5201.scala
parentda04d691c455aa3f3391bdbd9bac7fb59f29cedf (diff)
downloadscala-a516098d4ed774c5ff4f53ef22ed8eb90dc1b8d5.tar.gz
scala-a516098d4ed774c5ff4f53ef22ed8eb90dc1b8d5.tar.bz2
scala-a516098d4ed774c5ff4f53ef22ed8eb90dc1b8d5.zip
Fixes SI-5201. Adds flatten to TraversableViewLike.
Note: This commit exposes a pretty rich type on flatten in views. HOWEVER, because we don't capture the higher kinded type of the underlying collection, it makes returning a more minimal type pretty dang hard. I can imagine a very breaking and painful change of capturing the underling collection as a higher-kinded type as well as the current view type in a *ViewLike.scala. I hope this kind of issue, along with others, drives a rethink of our view API design.
Diffstat (limited to 'test/files/run/t5201.scala')
-rw-r--r--test/files/run/t5201.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/t5201.scala b/test/files/run/t5201.scala
new file mode 100644
index 0000000000..a371082797
--- /dev/null
+++ b/test/files/run/t5201.scala
@@ -0,0 +1,5 @@
+object Test extends App {
+ val seq = Seq(Seq(1, 2), Seq(3, 4)).view.flatten
+
+ Console.println(seq.isInstanceOf[collection.SeqView[_,_]])
+}