Skip to content

Commit

Permalink
Leveraged -Xmigration to burn off some warts wh...
Browse files Browse the repository at this point in the history
Leveraged -Xmigration to burn off some warts which arose in the new
collections. Warnings put in place for behavioral changes, allowing the
following. 1) Buffers: create new collections on

++ and -- like all the other collections.  2) Maps: eliminated
never-shipped redundant method valuesIterable and supplied these
return types:

  def keys: Iterable[A]
  def keysIterator: Iterator[A]
  def values: Iterable[B]
  def valuesIterator: Iterator[B]
  def keySet: Set[A]

I concluded that keys should return Iterable because keySet also exists
on Map, and is not solely in the province of Maps even if we wanted to
change it: it's defined on Sorted and also appears in some Sets. So it
seems sensible to have keySet return a Set and keys return the more
general type.

Closes scala#3089, scala#3145.  Review by odersky.
  • Loading branch information
paulp authored and adriaanm committed Jul 18, 2013
1 parent f540cc8 commit 54fb6d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scala/tools/partest/nest/ConsoleFileManager.scala
Expand Up @@ -152,7 +152,7 @@ class ConsoleFileManager extends FileManager {
)

// run setup based on most recent time
pairs(pairs.keysIterator.toList max)()
pairs(pairs.keys max)()

latestFjbgFile = prefixFile("lib/fjbg.jar")
}
Expand Down

0 comments on commit 54fb6d2

Please sign in to comment.