Add tests for converting expressions of function types to suspending functional types
This commit is contained in:
committed by
teamcityserver
parent
780b9a032b
commit
0cc6fbbc6e
+17
@@ -0,0 +1,17 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user