Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/kt2865.fir.kt
T
Tianyu Geng e1c80ac75c FIR checker: introduce NO_(GET|SET)_METHOD
Besides introducing new diagnostics, this commit unifies source usages
for array accesses in PSI & LT.
2021-03-24 16:25:01 +03:00

13 lines
281 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
operator fun <K, V> MutableMap<K, V>.set(k: K, v: V) {}
fun foo(a: MutableMap<String, String>, x: String?) {
a[x!!] = x
a[x] = x!!
}
fun foo1(a: MutableMap<String, String>, x: String?) {
<!INAPPLICABLE_CANDIDATE!>a[x]<!> = x!!
a[x!!] = x
}