From f972729b04c44c12ea10d5aa5bb841fc3b40ab69 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 15 Mar 2010 04:45:47 +0000 Subject: Leveraged -Xmigration to burn off some warts wh... 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 #3089, #3145. Review by odersky. --- .../scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scalap') diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala index 43ef9d2107..950d615f21 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -404,7 +404,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { "\\$greater" -> ">", "\\$qmark" -> "?", "\\$percent" -> "%", "\\$amp" -> "&", "\\$colon" -> ":", "\\$u2192" -> "→", "\\$hash" -> "#") - val pattern = Pattern.compile(_syms.keysIterator.foldLeft("")((x, y) => if (x == "") y else x + "|" + y)) + val pattern = Pattern.compile(_syms.keys.foldLeft("")((x, y) => if (x == "") y else x + "|" + y)) val placeholderPattern = "_\\$(\\d)+" private def stripPrivatePrefix(name: String) = { -- cgit v1.2.3