aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8428.scala
blob: d79a698d4ca86be9702448e986c3a27fa5916c6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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)
}