[FIR] Introduce valueClassRepresentation to FIR
#KT-1179
This commit is contained in:
committed by
teamcity
parent
28bf83ceac
commit
b6f2513dd2
+1
-1
@@ -18,5 +18,5 @@ class InlineClassRepresentation<Type : SimpleTypeMarker> constructor(
|
||||
|
||||
override fun containsPropertyWithName(name: Name): Boolean = underlyingPropertyName == name
|
||||
|
||||
override fun propertyTypeByName(name: Name): Type? = underlyingType.takeIf { containsPropertyWithName(name) }
|
||||
override fun getPropertyTypeByName(name: Name): Type? = underlyingType.takeIf { containsPropertyWithName(name) }
|
||||
}
|
||||
+1
-1
@@ -17,5 +17,5 @@ class MultiFieldValueClassRepresentation<Type : SimpleTypeMarker>(
|
||||
}
|
||||
|
||||
override fun containsPropertyWithName(name: Name): Boolean = name in map
|
||||
override fun propertyTypeByName(name: Name): Type? = map[name]
|
||||
override fun getPropertyTypeByName(name: Name): Type? = map[name]
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ interface TypeSystemCommonBackendContext : TypeSystemContext {
|
||||
|
||||
fun TypeConstructorMarker.isInlineClass(): Boolean
|
||||
fun TypeConstructorMarker.isMultiFieldValueClass(): Boolean
|
||||
fun TypeConstructorMarker.valueClassRepresentationTypeMarkersList(): List<Pair<Name, SimpleTypeMarker>>?
|
||||
fun TypeConstructorMarker.getValueClassProperties(): List<Pair<Name, SimpleTypeMarker>>?
|
||||
fun TypeConstructorMarker.isInnerClass(): Boolean
|
||||
fun TypeParameterMarker.getRepresentativeUpperBound(): KotlinTypeMarker
|
||||
fun KotlinTypeMarker.getUnsubstitutedUnderlyingType(): KotlinTypeMarker?
|
||||
|
||||
@@ -749,7 +749,7 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
|
||||
return (declarationDescriptor as? ClassDescriptor)?.valueClassRepresentation is MultiFieldValueClassRepresentation
|
||||
}
|
||||
|
||||
override fun TypeConstructorMarker.valueClassRepresentationTypeMarkersList(): List<Pair<Name, SimpleTypeMarker>>? {
|
||||
override fun TypeConstructorMarker.getValueClassProperties(): List<Pair<Name, SimpleTypeMarker>>? {
|
||||
require(this is TypeConstructor, this::errorMessage)
|
||||
return (declarationDescriptor as? ClassDescriptor)?.valueClassRepresentation?.underlyingPropertyNamesToTypes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user