Can you access the IrType for Unit without drillin...
# compiler
c
Can you access the IrType for Unit without drilling down an IrBuiltIns object all the way down to your use-site?
i
Well, technically you can traverse all the files and find a declaration that return or uses a Unit type with
type.isUnit()
. Then you can just copy it
(type as? IrSimpleType)?.toBuilder()?.buildSimpleType()
. But I would recommend just passing
IrBuiltIns
.
👍 1