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:
+4
-1
@@ -11,4 +11,7 @@ import org.jetbrains.kotlin.types.model.SimpleTypeMarker
|
||||
class InlineClassRepresentation<Type : SimpleTypeMarker>(
|
||||
val underlyingPropertyName: Name,
|
||||
val underlyingType: Type,
|
||||
)
|
||||
) {
|
||||
inline fun <Other : SimpleTypeMarker> mapUnderlyingType(transform: (Type) -> Other): InlineClassRepresentation<Other> =
|
||||
InlineClassRepresentation(underlyingPropertyName, transform(underlyingType))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user