summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t5201.check1
-rw-r--r--test/files/run/t5201.scala8
-rw-r--r--test/files/run/t5328.check3
-rw-r--r--test/files/run/t5328.scala5
4 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t5201.check b/test/files/run/t5201.check
new file mode 100644
index 0000000000..27ba77ddaf
--- /dev/null
+++ b/test/files/run/t5201.check
@@ -0,0 +1 @@
+true
diff --git a/test/files/run/t5201.scala b/test/files/run/t5201.scala
new file mode 100644
index 0000000000..48aa7ba54c
--- /dev/null
+++ b/test/files/run/t5201.scala
@@ -0,0 +1,8 @@
+object Test extends App {
+ // First make sure specific types are preserved
+ val tmp: Vector[Int] = Vector(Vector(1,2), Vector(3,4)).view.flatten.force
+
+ // Now make sure we really get a view
+ val seq = Seq(Seq(1, 2), Seq(3, 4)).view.flatten
+ Console.println(seq.isInstanceOf[collection.SeqView[_,_]])
+}
diff --git a/test/files/run/t5328.check b/test/files/run/t5328.check
new file mode 100644
index 0000000000..77a43968c5
--- /dev/null
+++ b/test/files/run/t5328.check
@@ -0,0 +1,3 @@
+2
+1,2,8
+1,8,3
diff --git a/test/files/run/t5328.scala b/test/files/run/t5328.scala
new file mode 100644
index 0000000000..12adf45b84
--- /dev/null
+++ b/test/files/run/t5328.scala
@@ -0,0 +1,5 @@
+object Test extends App {
+ println(Vector(1).view.updated(0,2).toList mkString ",")
+ println(Seq(1,2,3).view.updated(2,8).toList mkString ",")
+ println(List(1,2,3).view.updated(1,8).toList mkString ",")
+}