diff options
author | Som Snytt <som.snytt@gmail.com> | 2017-02-24 13:53:47 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2017-02-26 18:24:00 -0800 |
commit | 094f7f9463b46ff4f14d6e00b5ab81ed73fa8eb0 (patch) | |
tree | 5c109d19ed87ff124d9de387a7ae9992dbbb739d /test/files/neg/t10207.scala | |
parent | 5f1a638cf5f3b81fd3d8b4fa92a5a52ac5733517 (diff) | |
download | scala-094f7f9463b46ff4f14d6e00b5ab81ed73fa8eb0.tar.gz scala-094f7f9463b46ff4f14d6e00b5ab81ed73fa8eb0.tar.bz2 scala-094f7f9463b46ff4f14d6e00b5ab81ed73fa8eb0.zip |
SI-10207 Error before update conversion
Gaze deeper for errors before committing to conversion
of assignment to update. The error buried in the transformed
tree escapes notice of retypechecking and leaks to backend.
Diffstat (limited to 'test/files/neg/t10207.scala')
-rw-r--r-- | test/files/neg/t10207.scala | 16 |
1 files changed, 16 insertions, 0 deletions
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") +} + |