scala / collection-strawman

Implementation of the new Scala 2.13 Collections
Apache License 2.0
200 stars 72 forks source link

mkString collision between `MapOps` and `IterableOnceOps` #504

Closed Ichoran closed 6 years ago

Ichoran commented 6 years ago

Let x be a map. Then x.mkString complains with stuff like

scala> val x = strawman.collection.immutable.Map("fish" -> 3)
x: strawman.collection.immutable.Map[String,Int] = ChampHashMap(fish -> 3)

scala> x.mkString
         ^
       error: ambiguous reference to overloaded definition,
       both method mkString in trait MapOps of type (start: String, sep: String, end: String)String
       and  method mkString in trait IterableOnceOps of type => String
       match expected type ?