[JS IR] Fix for pureness of vararg

This commit is contained in:
Ilya Goncharov
2021-03-06 14:10:20 +03:00
parent 278a8c27fc
commit 76005813ff
@@ -664,7 +664,7 @@ fun IrExpression?.isPure(
}
is IrCall -> context?.isSideEffectFree(this) ?: false
is IrGetObjectValue -> type.isUnit()
is IrVararg -> elements.all { (it as? IrExpression).isPure(anyVariable, checkFields, context) }
is IrVararg -> elements.all { (it as? IrExpression)?.isPure(anyVariable, checkFields, context) == true }
else -> false
}
}