summaryrefslogtreecommitdiff
path: root/test/files/run/t8428.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t8428.scala')
-rw-r--r--test/files/run/t8428.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t8428.scala b/test/files/run/t8428.scala
new file mode 100644
index 0000000000..7da1207b7b
--- /dev/null
+++ b/test/files/run/t8428.scala
@@ -0,0 +1,12 @@
+object Test extends App {
+ val xs = List.tabulate(4)(List(_))
+ val i = xs.map(_.iterator).reduce { (a,b) =>
+ a.hasNext
+ a ++ b
+ }
+
+ val r1 = i.toList
+ val r2 = xs.flatten.toList
+
+ assert(r1 == r2, r1)
+}