[FIR] KT-57665: Ensure the current K2 behavior differs from K1

This commit is contained in:
Nikolay Lunyak
2023-03-31 17:14:17 +03:00
committed by Space Team
parent d1282b6195
commit 18f80b1ab5
4 changed files with 42 additions and 0 deletions
@@ -0,0 +1,15 @@
// ISSUE: KT-57665
// DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> T.foo(a: String, b: (T) -> Unit) {
this.asDynamic().goo(jso {
this.<!UNRESOLVED_REFERENCE!>asjhasdas<!>
})
}
fun <T : Any> jso(): T =
js("({})")
fun <T : Any> jso(
block: T.() -> Unit,
): T = jso<T>().apply(block)
@@ -0,0 +1,15 @@
// ISSUE: KT-57665
// DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> T.foo(a: String, b: (T) -> Unit) {
this.asDynamic().goo(jso {
this.asjhasdas
})
}
fun <T : Any> jso(): T =
js("({})")
fun <T : Any> jso(
block: T.() -> Unit,
): T = jso<T>().apply(block)