diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2009-11-03 10:37:56 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2009-11-03 10:37:56 +0000 |
commit | 094ed77bd98bbdd22fa8fee4a3e5c3dc0118dc2b (patch) | |
tree | daada3340bcd5735713fc68cc3648107f7f8646e /test | |
parent | 3d115bd2a4191c28e6d8a9c2633740288479cec7 (diff) | |
download | scala-094ed77bd98bbdd22fa8fee4a3e5c3dc0118dc2b.tar.gz scala-094ed77bd98bbdd22fa8fee4a3e5c3dc0118dc2b.tar.bz2 scala-094ed77bd98bbdd22fa8fee4a3e5c3dc0118dc2b.zip |
fixed #2500: refactoring collections so that a ...
fixed #2500: refactoring collections so that a `collection.{Map|SortedMap|SortedSet}` can be built from the corresponding collection (thus, do not require the immutable one)
pulling up newBuilder method from Immutable*Factory to *Factory, and
inheriting *Factory in scala.collection companion objects, instead of
the Immutable*Factory this way, you can, e.g., build a collection.Map
from a collection.Map (instead of requiring an immutable.Map)
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t2500.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t2500.scala b/test/files/pos/t2500.scala new file mode 100644 index 0000000000..76dea4cf8d --- /dev/null +++ b/test/files/pos/t2500.scala @@ -0,0 +1,6 @@ +object Test { + import scala.collection._ + ((Map(1 -> "a", 2 -> "b"): collection.Map[Int, String]) map identity[(Int, String)]) : scala.collection.Map[Int,String] + ((SortedMap(1 -> "a", 2 -> "b"): collection.SortedMap[Int, String]) map identity[(Int, String)]): scala.collection.SortedMap[Int,String] + ((SortedSet(1, 2): collection.SortedSet[Int]) map identity[Int]): scala.collection.SortedSet[Int] +}
\ No newline at end of file |