Enable suspend conversions by default in 1.6

^KT-48618 Fixed
This commit is contained in:
Victor Petukhov
2021-09-06 18:46:38 +03:00
parent 86d8468b8b
commit ce02cd4729
10 changed files with 71 additions and 1 deletions
@@ -0,0 +1,27 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo1(f: suspend () -> String) {}
fun foo2(f: suspend (Int) -> String) {}
fun foo3(f: suspend () -> Unit) {}
fun test(
f0: suspend () -> String,
f1: () -> String,
f2: (Int) -> String,
f3: () -> Unit,
) {
foo1 { "str" }
foo1(f0)
foo1(f1)
foo2(f2)
foo3(f3)
}
fun box(): String {
test({ "" }, { "" }, { it.toString() }, {})
return "OK"
}