summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-07-06 19:42:57 +0200
committerStefan Zeiger <szeiger@novocode.com>2016-07-07 15:08:07 +0200
commit7e933d5b5a4c1c8795b74e67e2148c6fc4ca19a6 (patch)
tree6a7309dfe74e0b996700774dd0abae2c37cc4255 /test
parent6612ba010b0e70c53550d1e47141c8dc89a55f23 (diff)
downloadscala-7e933d5b5a4c1c8795b74e67e2148c6fc4ca19a6.tar.gz
scala-7e933d5b5a4c1c8795b74e67e2148c6fc4ca19a6.tar.bz2
scala-7e933d5b5a4c1c8795b74e67e2148c6fc4ca19a6.zip
SI-6947 Better type parameter names for Map classes
Type parameter names are currently assigned pretty much alphabetically without any meaning. This change renames all key parameters in Map classes from `A` to `K` and all value parameters from `B` to `V` to make them more meaningful. Derived names are renamed accordingly (e.g. `V1` instead of `B1` for an upper bound on `V`, `W` instead of `C` for a new value type). As a side-effect this solves the documentation problem in SI-6947. Due to using `B` both as a type parameter for `foldLeft[B]` in `GenTraversableOnce[A]` and in `Map[A, B]` which extends `GenTraversableOnce[(A, B)]`, the signature of `Map.foldLeft` was rendered in scaladoc as def foldLeft[B](z: B)(op: (B, (A, B)) ⇒ B): B Now you get an unambiguous version: def foldLeft[B](z: B)(op: (B, (K, V)) ⇒ B): B
Diffstat (limited to 'test')
-rw-r--r--test/files/run/xMigration.check6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/xMigration.check b/test/files/run/xMigration.check
index cd860bf394..1104dbea83 100644
--- a/test/files/run/xMigration.check
+++ b/test/files/run/xMigration.check
@@ -11,7 +11,7 @@ scala> :setting -Xmigration:any
scala> Map(1 -> "eis").values // warn
<console>:12: warning: method values in trait MapLike has changed semantics in version 2.8.0:
-`values` returns `Iterable[B]` rather than `Iterator[B]`.
+`values` returns `Iterable[V]` rather than `Iterator[V]`.
Map(1 -> "eis").values // warn
^
res2: Iterable[String] = MapLike(eis)
@@ -25,7 +25,7 @@ scala> :setting -Xmigration:2.7
scala> Map(1 -> "eis").values // warn
<console>:12: warning: method values in trait MapLike has changed semantics in version 2.8.0:
-`values` returns `Iterable[B]` rather than `Iterator[B]`.
+`values` returns `Iterable[V]` rather than `Iterator[V]`.
Map(1 -> "eis").values // warn
^
res4: Iterable[String] = MapLike(eis)
@@ -39,7 +39,7 @@ scala> :setting -Xmigration // same as :any
scala> Map(1 -> "eis").values // warn
<console>:12: warning: method values in trait MapLike has changed semantics in version 2.8.0:
-`values` returns `Iterable[B]` rather than `Iterator[B]`.
+`values` returns `Iterable[V]` rather than `Iterator[V]`.
Map(1 -> "eis").values // warn
^
res6: Iterable[String] = MapLike(eis)