d41fc0b599
- support chained suspend conversion + SAM conversion - support suspend conversion in vararg elements
18 lines
249 B
Kotlin
Vendored
18 lines
249 B
Kotlin
Vendored
// !LANGUAGE: +SuspendConversion
|
|
// SKIP_KT_DUMP
|
|
|
|
fun interface SuspendRunnable {
|
|
suspend fun invoke()
|
|
}
|
|
|
|
fun foo(s: SuspendRunnable) {}
|
|
|
|
fun bar(): () -> Unit = {}
|
|
|
|
fun test(f: () -> Unit) {
|
|
foo(f)
|
|
foo(bar())
|
|
var t = f
|
|
foo(t)
|
|
}
|