Do not assert existence of metadata for local delegated properties
Local delegated property may origin from a body of inlined function. In that case, they contain no metatada - which is ok, as the original local delegated properties contain it and will be serialized. ^KT-58780: Fixed
This commit is contained in:
committed by
Space Team
parent
4b85776405
commit
d600d768a6
+2
-2
@@ -54,8 +54,8 @@ fun makeFirMetadataSerializerForIrClass(
|
||||
irActualizedResult: IrActualizedResult?
|
||||
): FirMetadataSerializer {
|
||||
val approximator = TypeApproximatorForMetadataSerializer(session)
|
||||
val localDelegatedProperties = context.localDelegatedProperties[irClass.attributeOwnerId]?.map {
|
||||
(it.owner.metadata as FirMetadataSource.Property).fir.copyToFreeProperty(approximator)
|
||||
val localDelegatedProperties = context.localDelegatedProperties[irClass.attributeOwnerId]?.mapNotNull {
|
||||
(it.owner.metadata as? FirMetadataSource.Property)?.fir?.copyToFreeProperty(approximator)
|
||||
} ?: emptyList()
|
||||
val firSerializerExtension = FirJvmSerializerExtension(
|
||||
session, serializationBindings, context.state, irClass.metadata, localDelegatedProperties,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_INLINER_K2: IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package x
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_INLINER_K2: IR
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_INLINER_K2: IR
|
||||
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
|
||||
// FILE: test.kt
|
||||
package test
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_INLINER_K2: IR
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_INLINER_K2: IR
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user