Fix non-suspending labeled loop in suspend function
Fix bug when labeled loop, which does not contain suspend calls in its body, was losing its label
This commit is contained in:
@@ -93,7 +93,14 @@ class CoroutineBodyTransformer(private val program: JsProgram, private val conte
|
||||
when (inner) {
|
||||
is JsWhile,
|
||||
is JsDoWhile,
|
||||
is JsFor -> inner.accept(this)
|
||||
is JsFor -> {
|
||||
if (x in nodesToSplit) {
|
||||
inner.accept(this)
|
||||
}
|
||||
else {
|
||||
currentStatements += x
|
||||
}
|
||||
}
|
||||
|
||||
else -> splitIfNecessary(x) {
|
||||
val successor = CoroutineBlock()
|
||||
|
||||
Reference in New Issue
Block a user