d41fc0b599
- support chained suspend conversion + SAM conversion - support suspend conversion in vararg elements
20 lines
335 B
Kotlin
Vendored
20 lines
335 B
Kotlin
Vendored
// !LANGUAGE: +SuspendConversion
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// IGNORE_BACKEND: WASM
|
|
|
|
fun foo1(f: suspend () -> Unit) {}
|
|
fun bar1() {}
|
|
|
|
fun <T> foo2(e: T, f: suspend (T) -> Unit) {}
|
|
fun bar2(x: Int) {}
|
|
fun bar2(s: String) {}
|
|
|
|
fun box(): String {
|
|
foo1(::bar1)
|
|
|
|
foo2(42, ::bar2)
|
|
foo2("str", ::bar2)
|
|
|
|
return "OK"
|
|
}
|