Minor cosmetic readability fixes in VarargLowering

^KT-40689 fixed
This commit is contained in:
Shagen Ogandzhanian
2021-01-08 04:13:12 +01:00
committed by TeamCityServer
parent c996161db0
commit 31f5bcfaef
@@ -119,7 +119,7 @@ private class VarargTransformer(
for (e in expression.elements) {
when (e) {
is IrSpreadElement -> {
if (!currentList.isEmpty()) {
if (currentList.isNotEmpty()) {
segments.add(arrayInfo.toPrimitiveArrayLiteral(currentList))
currentList.clear()
}
@@ -131,7 +131,7 @@ private class VarargTransformer(
}
}
}
if (!currentList.isEmpty()) {
if (currentList.isNotEmpty()) {
segments.add(arrayInfo.toPrimitiveArrayLiteral(currentList))
currentList.clear()
}
@@ -207,7 +207,7 @@ private class VarargTransformer(
if (argument == null && varargElementType != null) {
val arrayInfo = InlineClassArrayInfo(varargElementType, parameter.type)
val emptyArray = with (arrayInfo) {
boxArrayIfNeeded(toPrimitiveArrayLiteral(emptyList<IrExpression>()))
boxArrayIfNeeded(toPrimitiveArrayLiteral(emptyList()))
}
expression.putValueArgument(i, emptyArray)