FIC: Support conversions for suspend functions

This commit is contained in:
Mikhail Zarechenskiy
2019-11-14 16:17:29 +03:00
parent f43769c50d
commit 0f242a9931
6 changed files with 42 additions and 1 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
fun interface SuspendRunnable {
suspend fun invoke()
}
fun run(r: SuspendRunnable) {}
suspend fun bar() {}
fun test() {
run(::bar)
}