diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-07-11 15:17:03 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-07-11 15:17:03 +0000 |
commit | 74db0a59ad28f49bcf98ef839359697b680289cf (patch) | |
tree | 3c840b9a21609cc9d47b163d81232b95ee7d0aa8 /test/files | |
parent | 9e1d24d64283a4caf47cb68c00298538ca0b9999 (diff) | |
download | scala-74db0a59ad28f49bcf98ef839359697b680289cf.tar.gz scala-74db0a59ad28f49bcf98ef839359697b680289cf.tar.bz2 scala-74db0a59ad28f49bcf98ef839359697b680289cf.zip |
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.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t4761.check | 4 | ||||
-rw-r--r-- | test/files/run/t4761.scala | 15 |
2 files changed, 19 insertions, 0 deletions
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) + } +} |