Add tests for converting expressions of function types to suspending functional types

This commit is contained in:
Victor Petukhov
2021-07-13 15:34:37 +03:00
committed by teamcityserver
parent 780b9a032b
commit 0cc6fbbc6e
30 changed files with 1065 additions and 0 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
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"
}