Coroutines bug fix: correct handling of returnIfSuspended intrinsic

This commit is contained in:
Igor Chevdar
2017-05-18 18:40:36 +03:00
parent e834218183
commit 072da99ba3
2 changed files with 50 additions and 31 deletions
@@ -9,7 +9,7 @@ internal fun <T> getContinuation(): Continuation<T> = throw AssertionError("Call
@Intrinsic
@PublishedApi
internal fun <T> returnIfSuspended(value: Any?): T = throw AssertionError("Call to returnIfSuspended should've been lowered")
internal suspend fun <T> returnIfSuspended(value: Any?): T = throw AssertionError("Call to returnIfSuspended should've been lowered")
// Single-threaded continuation.
class SafeContinuation<in T>