JVM_IR: reuse same bodies for suspend funs and $$forInline versions

This commit is contained in:
pyos
2020-03-04 13:37:20 +01:00
committed by Ilmir Usmanov
parent 8945d5a0df
commit 5ed845d0b4
16 changed files with 152 additions and 97 deletions
@@ -0,0 +1,12 @@
// WITH_COROUTINES
// TREAT_AS_ONE_FILE
inline suspend fun runReturning(lambda: suspend () -> Unit): Unit =
lambda()
inline suspend fun myRun(lambda: suspend () -> String): String {
runReturning { return lambda() }
return "fail: did not return from lambda"
}
// 0 NON_LOCAL_RETURN