aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8428.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t8428.scala')
-rw-r--r--tests/run/t8428.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/t8428.scala b/tests/run/t8428.scala
new file mode 100644
index 000000000..d79a698d4
--- /dev/null
+++ b/tests/run/t8428.scala
@@ -0,0 +1,12 @@
+object Test extends dotty.runtime.LegacyApp {
+ 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)
+}