diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2017-02-27 13:16:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 13:16:57 +0100 |
commit | 920bc4e31c5415d98c1a7f26aebc790250aafe4a (patch) | |
tree | e5bae6ef0b3d6dab0cfa32bc86ca41a437ff552f /test | |
parent | 1b4d36f0c44e7a25df987f7e9855ceafe28c0b2a (diff) | |
parent | 094f7f9463b46ff4f14d6e00b5ab81ed73fa8eb0 (diff) | |
download | scala-920bc4e31c5415d98c1a7f26aebc790250aafe4a.tar.gz scala-920bc4e31c5415d98c1a7f26aebc790250aafe4a.tar.bz2 scala-920bc4e31c5415d98c1a7f26aebc790250aafe4a.zip |
Merge pull request #5743 from som-snytt/issue/10207-bad-update
SI-10207 Error before update conversion
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/neg/t10207.check | 4 | ||||
-rw-r--r-- | test/files/neg/t10207.scala | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/t10207.check b/test/files/neg/t10207.check new file mode 100755 index 0000000000..3330db44a5 --- /dev/null +++ b/test/files/neg/t10207.check @@ -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 diff --git a/test/files/neg/t10207.scala b/test/files/neg/t10207.scala new file mode 100644 index 0000000000..2dfc5d75c9 --- /dev/null +++ b/test/files/neg/t10207.scala @@ -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") +} + |