New J2K: Fix JKStatement.isEmpty method by not considering empty block statement as empty statement
This commit is contained in:
committed by
Ilya Kirillov
parent
f223a6ebd1
commit
bcaea3182e
@@ -498,7 +498,7 @@ class JKForInStatementImpl(declaration: JKDeclaration, iterationExpression: JKEx
|
|||||||
fun JKStatement.isEmpty(): Boolean =
|
fun JKStatement.isEmpty(): Boolean =
|
||||||
when (this) {
|
when (this) {
|
||||||
is JKEmptyStatement -> true
|
is JKEmptyStatement -> true
|
||||||
is JKBlockStatement -> block is JKBodyStub || block.statements.isEmpty()
|
is JKBlockStatement -> block is JKBodyStub
|
||||||
is JKExpressionStatement -> expression is JKStubExpression
|
is JKExpressionStatement -> expression is JKStubExpression
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user