[JS IR BE] Fix unboxing empty inline class varargs

This commit is contained in:
Svyatoslav Kuzmich
2019-05-03 17:37:49 +03:00
parent 0aae760469
commit 130d2d00c3
@@ -112,7 +112,11 @@ private class VarargTransformer(
// empty vararg => empty array literal
if (segments.isEmpty()) {
return emptyList<IrExpression>().toArrayLiteral(primitiveExpressionType, primitiveElementType)
val res = emptyList<IrExpression>().toArrayLiteral(primitiveExpressionType, primitiveElementType)
return if (needUnboxing)
res.boxInlineClassIfNeeded(arrayInlineClass!!)
else
res
}
// vararg with a single segment => no need to concatenate