@@ -3191,9 +3191,7 @@ open class KotlinFileExtractor(
3191
3191
*/
3192
3192
3193
3193
if (e.origin != IrStatementOrigin .FOR_LOOP ||
3194
- e.statements.size != 2 ||
3195
- (e.statements[0 ] as ? IrVariable )?.origin != IrDeclarationOrigin .FOR_LOOP_ITERATOR ||
3196
- (e.statements[1 ] as ? IrWhileLoop )?.origin != IrStatementOrigin .FOR_LOOP_INNER_WHILE ) {
3194
+ e.statements.size != 2 ) {
3197
3195
return false
3198
3196
}
3199
3197
@@ -3240,9 +3238,9 @@ open class KotlinFileExtractor(
3240
3238
}
3241
3239
3242
3240
val id = extractLoop(innerWhile, null , parent, callable) { p, idx ->
3243
- val loopId = tw.getFreshIdLabel<DbEnhancedforstmt >()
3244
- tw.writeStmts_enhancedforstmt(loopId , p, idx, callable)
3245
- loopId
3241
+ tw.getFreshIdLabel<DbEnhancedforstmt >(). also {
3242
+ tw.writeStmts_enhancedforstmt(it , p, idx, callable)
3243
+ }
3246
3244
}
3247
3245
3248
3246
extractVariableExpr(loopVar, callable, id, 0 , id, extractInitializer = false )
@@ -4143,13 +4141,13 @@ open class KotlinFileExtractor(
4143
4141
) {
4144
4142
val id = extractLoop(loop, 1 , stmtExprParent, callable) { parent, idx ->
4145
4143
if (loop is IrWhileLoop ) {
4146
- val id = tw.getFreshIdLabel<DbWhilestmt >()
4147
- tw.writeStmts_whilestmt(id , parent, idx, callable)
4148
- id
4144
+ tw.getFreshIdLabel<DbWhilestmt >(). also {
4145
+ tw.writeStmts_whilestmt(it , parent, idx, callable)
4146
+ }
4149
4147
} else {
4150
- val id = tw.getFreshIdLabel<DbDostmt >()
4151
- tw.writeStmts_dostmt(id , parent, idx, callable)
4152
- id
4148
+ tw.getFreshIdLabel<DbDostmt >(). also {
4149
+ tw.writeStmts_dostmt(it , parent, idx, callable)
4150
+ }
4153
4151
}
4154
4152
}
4155
4153
extractExpressionExpr(loop.condition, callable, id, 0 , id)
0 commit comments