New J2K: Use JKBooleanLiteral for boolean literals
This commit is contained in:
committed by
Ilya Kirillov
parent
d3a6b4f12b
commit
8df99e54f8
@@ -31,7 +31,7 @@ class ForConversion(private val context: ConversionContext) : RecursiveApplicabl
|
|||||||
val whileBody = createWhileBody(loopStatement)
|
val whileBody = createWhileBody(loopStatement)
|
||||||
val condition =
|
val condition =
|
||||||
if (loopStatement.condition !is JKStubExpression) loopStatement::condition.detached()
|
if (loopStatement.condition !is JKStubExpression) loopStatement::condition.detached()
|
||||||
else JKKtLiteralExpressionImpl("true", JKLiteralExpression.LiteralType.BOOLEAN)
|
else JKBooleanLiteral(true)
|
||||||
val whileStatement = JKWhileStatementImpl(condition, whileBody)
|
val whileStatement = JKWhileStatementImpl(condition, whileBody)
|
||||||
|
|
||||||
if (loopStatement.initializer is JKEmptyStatement) return whileStatement
|
if (loopStatement.initializer is JKEmptyStatement) return whileStatement
|
||||||
|
|||||||
Reference in New Issue
Block a user