Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/arguments/setWithTrailingLambda.kt
T
Dmitriy Novozhilov df47581c5a [FIR] Consider call site in argument mapping handling for set operator call
^KT-56542 Fixed
^KT-56714 Fixed
2023-02-28 09:17:40 +00:00

19 lines
419 B
Kotlin
Vendored

// ISSUE: KT-56714
fun test(m: MyMap<EditorData, Any>) {
m.set(SomeKey) { _, _ -> }
m[SomeKey] = { _, _ -> }
}
data class EditorData(val meta: MyMap<EditorData, Any>)
interface MyMap<Domain, V : Any> {
operator fun <T : V> set(k: Key<T, Domain>, v: T)
}
interface Key<V : Any, in Domain>
interface EditorDataKey<T : Any> : Key<T, EditorData>
object SomeKey : EditorDataKey<(String, bar: Any) -> Unit>