New J2K: Fix labeled while conversion
This commit is contained in:
committed by
Ilya Kirillov
parent
b396ee0cca
commit
d3a6b4f12b
@@ -42,7 +42,9 @@ class ForConversion(private val context: ConversionContext) : RecursiveApplicabl
|
||||
loopStatement::initializer.detached(),
|
||||
whileStatement
|
||||
)
|
||||
return if (loopStatement.parent!! is JKBlock) convertedFromForLoopSyntheticWhileStatement
|
||||
val notNeedParentBlock = loopStatement.parent is JKBlock
|
||||
|| loopStatement.parent is JKLabeledStatement && loopStatement.parent?.parent is JKBlock
|
||||
return if (notNeedParentBlock) convertedFromForLoopSyntheticWhileStatement
|
||||
else blockStatement(convertedFromForLoopSyntheticWhileStatement)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user