IR: add IrClass.getInlineClassRepresentation, serialize/deserialize it

The change in FirDeclarationUtil is needed because in case of unsigned
types loaded from the standard library, the primary constructor for some
reason is not the first, but the second in the list of constructors.
This commit is contained in:
Alexander Udalov
2021-03-30 18:16:37 +02:00
parent 4c7f207309
commit 54befa769f
33 changed files with 950 additions and 59 deletions
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.types.IrSimpleType
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.Name
@@ -64,6 +65,8 @@ class IrClassImpl(
override var superTypes: List<IrType> = emptyList()
override var inlineClassRepresentation: InlineClassRepresentation<IrSimpleType>? = null
override var metadata: MetadataSource? = null
override var attributeOwnerId: IrAttributeContainer = this