[FIR2IR] Configure Unit built-in to have kotlin.Any as a supertype

Without this change, the Unit type does not have Any members declared
in its scope which breaks the expect/actual mapping
(aka we cannot find actual `toString` for expect one).
This commit is contained in:
marat.akhin
2023-07-20 17:54:53 +02:00
committed by Space Team
parent e87bccd5c7
commit 6df9ce23f7
@@ -95,7 +95,10 @@ class IrBuiltInsOverFir(
override val nothingType: IrType get() = nothing.type
override val nothingNType: IrType by lazy { nothingType.makeNullable() }
private val unit by createClass(kotlinIrPackage, IdSignatureValues.unit, build = { kind = ClassKind.OBJECT; modality = Modality.FINAL })
private val unit by createClass(kotlinIrPackage, IdSignatureValues.unit, build = { kind = ClassKind.OBJECT; modality = Modality.FINAL }) {
configureSuperTypes()
finalizeClassDefinition()
}
override val unitClass: IrClassSymbol get() = unit.klass
override val unitType: IrType get() = unit.type