New J2K: Use JKBooleanLiteral for boolean literals

This commit is contained in:
Ilya Kirillov
2019-01-15 18:06:09 +03:00
committed by Ilya Kirillov
parent d3a6b4f12b
commit 8df99e54f8
@@ -31,7 +31,7 @@ class ForConversion(private val context: ConversionContext) : RecursiveApplicabl
val whileBody = createWhileBody(loopStatement)
val condition =
if (loopStatement.condition !is JKStubExpression) loopStatement::condition.detached()
else JKKtLiteralExpressionImpl("true", JKLiteralExpression.LiteralType.BOOLEAN)
else JKBooleanLiteral(true)
val whileStatement = JKWhileStatementImpl(condition, whileBody)
if (loopStatement.initializer is JKEmptyStatement) return whileStatement