Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.kt
T
Nikolay Lunyak 3b0a923210 [FIR] KT-57665: Make dynamic members' parameters dynamic
Parameter types are not only used "to accept" some data,
but they also are used as inputs for inference
(expected types)

^KT-57665 Fixed
2023-04-05 16:51:50 +00:00

17 lines
292 B
Kotlin
Vendored

// FIR_IDENTICAL
// 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)