[FIR] Resolve value class constructor to TYPES before using its params

Right now it is the easiest way to ensure that all the parameters are
resolved. After KT-53573 is fixed, we might use `resolvedReturnTypeRef`
on each parameter individually instead

Also, add `toString` implementation to `ValueClassRepresentation`
classes, so they are properly rendered in testdata

^KTIJ-22630 Fixed
This commit is contained in:
Roman Golyshev
2022-08-29 19:40:07 +02:00
committed by Space
parent 17f22c7204
commit 16cb3064c8
6 changed files with 213 additions and 2 deletions
@@ -19,4 +19,7 @@ class InlineClassRepresentation<Type : SimpleTypeMarker> constructor(
override fun containsPropertyWithName(name: Name): Boolean = underlyingPropertyName == name
override fun getPropertyTypeByName(name: Name): Type? = underlyingType.takeIf { containsPropertyWithName(name) }
override fun toString(): String =
"InlineClassRepresentation(underlyingPropertyName=$underlyingPropertyName, underlyingType=$underlyingType)"
}
@@ -18,4 +18,7 @@ class MultiFieldValueClassRepresentation<Type : SimpleTypeMarker>(
override fun containsPropertyWithName(name: Name): Boolean = name in map
override fun getPropertyTypeByName(name: Name): Type? = map[name]
override fun toString(): String =
"MultiFieldValueClassRepresentation(underlyingPropertyNamesToTypes=$underlyingPropertyNamesToTypes)"
}