forked from scala/scala
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#5743 from som-snytt/issue/10207-bad-update
SI-10207 Error before update conversion
- Loading branch information
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
t10207.scala:14: error: too many arguments (2) for method apply: (key: Int)scala.collection.mutable.ArrayBuffer[String] in trait MapLike | ||
m(1, (_ => empty)) ++= AB("eins", "uno") | ||
^ | ||
one error found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
// Was: | ||
// warning: an unexpected type representation reached the compiler backend | ||
// Now: | ||
// error: too many arguments (2) for method apply: (key: Int)scala.collection.mutable.ArrayBuffer[String] in trait MapLike | ||
|
||
trait Test { | ||
import collection.mutable.{Map=>MMap, ArrayBuffer=>AB} | ||
|
||
val m = MMap((1 -> AB("one"))) | ||
|
||
val empty = AB[String]() | ||
|
||
m(1, (_ => empty)) ++= AB("eins", "uno") | ||
} | ||
|