Files
kotlin-fork/compiler/testData/codegen/box/suspendConversion/severalConversionsInOneCall.kt
T
Dmitry Petrov d41fc0b599 PSI2IR fix suspend conversion tests
- support chained suspend conversion + SAM conversion
- support suspend conversion in vararg elements
2021-07-17 09:10:19 +03:00

20 lines
409 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
fun foo(f: () -> String, g: suspend () -> String, h: suspend () -> String) {}
fun test(f: () -> String, g: suspend () -> String) {
foo(f, f, f)
foo(f, { "str" }, f)
foo(f, f, g)
foo(f, g, g)
}
fun box(): String {
test({ "1" }, { "2" })
return "OK"
}