Skip to content

Commit

Permalink
Future-proof the collections for Dotty
Browse files Browse the repository at this point in the history
Just like what we did for concat in
scala#7696, we add a dummy parameter list
to avoid signature clashes between mixin forwarders, but this change
should be less controversial since it only affects a deprecated method.

Note that this isn't actually needed to compile with Dotty master yet
because we only emit mixin forwarders when required to, but we will soon
switch to emitting them all the time like scalac
does (scala/scala3#2563), therefore we need
to get the fix in first (and most importantly in time for 2.13).
  • Loading branch information
smarter committed Feb 13, 2019
1 parent 481a78b commit 3b72bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/scala/collection/Map.scala
Expand Up @@ -311,7 +311,7 @@ trait MapOps[K, +V, +CC[_, _] <: IterableOps[_, AnyConstr, _], +C]
}

@deprecated("Use ++ instead of ++: for collections of type Iterable", "2.13.0")
def ++: [V1 >: V](that: IterableOnce[(K,V1)]): CC[K,V1] = {
def ++: [V1 >: V](that: IterableOnce[(K,V1)])(implicit dummy: DummyImplicit): CC[K,V1] = {
val thatIterable: Iterable[(K, V1)] = that match {
case that: Iterable[(K, V1)] => that
case that => View.from(that)
Expand Down

0 comments on commit 3b72bff

Please sign in to comment.