Value classes: Add isValue property to class descriptors
Reuse isInline flag in proto and IR. Check metadata version on deserialization.
This commit is contained in:
+3
-1
@@ -98,7 +98,7 @@ class DeserializedClassDescriptor(
|
||||
|
||||
override fun isData() = Flags.IS_DATA.get(classProto.flags)
|
||||
|
||||
override fun isInline() = Flags.IS_INLINE_CLASS.get(classProto.flags)
|
||||
override fun isInline() = Flags.IS_INLINE_CLASS.get(classProto.flags) && metadataVersion.isAtMost(1, 4, 1)
|
||||
|
||||
override fun isExpect() = Flags.IS_EXPECT_CLASS.get(classProto.flags)
|
||||
|
||||
@@ -108,6 +108,8 @@ class DeserializedClassDescriptor(
|
||||
|
||||
override fun isFun() = Flags.IS_FUN_INTERFACE.get(classProto.flags)
|
||||
|
||||
override fun isValue() = Flags.IS_INLINE_CLASS.get(classProto.flags) && metadataVersion.isAtLeast(1, 4, 2)
|
||||
|
||||
override fun getUnsubstitutedMemberScope(kotlinTypeRefiner: KotlinTypeRefiner): MemberScope =
|
||||
memberScopeHolder.getScope(kotlinTypeRefiner)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user