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/run/t4761.scala | |
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/run/t4761.scala')
-rw-r--r-- | test/files/run/t4761.scala | 15 |
1 files changed, 15 insertions, 0 deletions
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) + } +} |