Running into a weird issue where a IrFunctionRefer...
# compiler
m
Running into a weird issue where a IrFunctionReferenceImpl passed as argument to an irCall, it seems to get lowered to
null.INSTANCE
, what could be the cause of this? Sample snippet where I pass a ctor reference:
Copy code
val result = irCall(apply).apply {
    typeArguments[0] = klass.defaultType
    dispatchReceiver = product
    arguments.addAll(1,
        listOf(
            builder,
            IrFunctionReferenceImpl(
                klass.startOffset,
                klass.endOffset,
                pluginContext.irBuiltIns.functionN(ctor.nonDispatchParameters.size).typeWith(*ctor.nonDispatchParameters.map { it.type }.toTypedArray(), klass.defaultType),
                ctor.symbol,
                0,
            )
        )
    )
}