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,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// WITH_RUNTIME
|
||||
// SKIP_TXT
|
||||
|
||||
class A<T>
|
||||
class C
|
||||
interface I
|
||||
|
||||
class E {
|
||||
operator fun <T> get(k: A<T>): T = TODO()
|
||||
operator fun <T : I> set(k: A<T>, v: T) { TODO() }
|
||||
operator fun set(k: A<C>, v: C) { TODO() }
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
E()[A<MutableList<Int>>()] += 1
|
||||
}
|
||||
Reference in New Issue
Block a user