Heyo, how would one build a IrCall with a vararg a...
# compiler
m
Heyo, how would one build a IrCall with a vararg as value parameter?
r
You want something like
Copy code
fun varargOf(elementType: IrType, elements: Iterable<IrExpression>) = IrVarargImpl(
        UNDEFINED_OFFSET,
        UNDEFINED_OFFSET,
        context.irBuiltIns.arrayClass.typeWith(elementType),
        elementType,
        elements.toList()
    )
Afaik there's no existing method for this
m
Thanks il give it a go later this evening