Fix wrong state-machine generation if inner object is retransformed

during inlining.
 #KT-29492 Fixed
This commit is contained in:
Ilmir Usmanov
2019-03-12 17:49:31 +03:00
parent 7b97c2a42a
commit 1c2b8e6fad
19 changed files with 481 additions and 55 deletions
@@ -83,6 +83,12 @@ fun createTextForHelpers(isReleaseCoroutines: Boolean, checkStateMachine: Boolea
var proceed: () -> Unit = {}
fun reset() {
counter = 0
finished = false
proceed = {}
}
suspend fun suspendHere() = suspendCoroutine<Unit> { c ->
counter++
proceed = { c.resume(Unit) }