Report resolution ambiguity on '+=' by taking into account full resolution result including post type checking for '+'
^KT-45503 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// SKIP_TXT
|
||||
|
||||
class A<T>(var x: T)
|
||||
|
||||
interface I
|
||||
|
||||
class C {
|
||||
operator fun <T> get(k: A<T>): T = k.x
|
||||
operator fun <T : I> set(k: A<T>, v: T) { k.x = v }
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
C()[A(mutableListOf(1))] += 2
|
||||
}
|
||||
Reference in New Issue
Block a user