From 74db0a59ad28f49bcf98ef839359697b680289cf Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Mon, 11 Jul 2011 15:17:03 +0000 Subject: Fixes #4761. This changes the signature of flatten - I do not see how to use a @bridge annotation here, since after erasure both the bridge and the original method have the same signature. Review by extempore. --- test/files/run/t4761.check | 4 ++++ test/files/run/t4761.scala | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/files/run/t4761.check create mode 100644 test/files/run/t4761.scala (limited to 'test/files') diff --git a/test/files/run/t4761.check b/test/files/run/t4761.check new file mode 100644 index 0000000000..1698a57bfa --- /dev/null +++ b/test/files/run/t4761.check @@ -0,0 +1,4 @@ +Vector(1, 1, 1, 1, 1) +Vector(Vector(1, 1, 1, 1, 1)) +List(1, 2) +List(List(1, 2)) diff --git a/test/files/run/t4761.scala b/test/files/run/t4761.scala new file mode 100644 index 0000000000..205798b00e --- /dev/null +++ b/test/files/run/t4761.scala @@ -0,0 +1,15 @@ + + + + +object Test { + def main(args: Array[String]) { + val gs = for (x <- (1 to 5)) yield { if (x % 2 == 0) List(1).seq else List(1).par } + println(gs.flatten) + println(gs.transpose) + + val s = Stream(Vector(1).par, Vector(2).par) + println(s.flatten.toList) + println(s.transpose.map(_.toList).toList) + } +} -- cgit v1.2.3