[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:
@@ -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)"
|
||||
}
|
||||
+3
@@ -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)"
|
||||
}
|
||||
Reference in New Issue
Block a user