Generate call of throwOnFailure instead of manual check

whether coroutine is resumed with exception.
 #KT-28015 Fixed
This commit is contained in:
Ilmir Usmanov
2019-02-14 14:41:06 +03:00
parent 7c83d5df93
commit 19d2262cf1
4 changed files with 31 additions and 12 deletions
@@ -0,0 +1,12 @@
// IGNORE_BACKEND: JVM_IR
// WITH_COROUTINES
// TREAT_AS_ONE_FILE
suspend fun foo() {}
suspend fun bar(): Int {
foo()
return 42
}
// 2 INVOKESTATIC kotlin/ResultKt.throwOnFailure \(Ljava/lang/Object;\)V