KT-5488 Invalid ambiguity between plus and plusAssign

#KT-5488  Fixed
This commit is contained in:
Andrey Breslav
2015-02-27 16:23:34 +03:00
parent 9c2a9e0bdb
commit 4c84b19b33
11 changed files with 170 additions and 18 deletions
@@ -0,0 +1,20 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class C {
fun get(i: Int): C = this
}
fun C.plus(a: Any): C = this
fun C.plusAssign(a: Any) {}
class C1 {
fun get(i: Int): C = C()
fun set(i: Int, v: C) {}
}
fun test() {
val c = C()
c[0] += ""
var c1 = C1()
c1[0] <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> ""
}