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?
|
irActualizedResult: IrActualizedResult?
|
||||||
): FirMetadataSerializer {
|
): FirMetadataSerializer {
|
||||||
val approximator = TypeApproximatorForMetadataSerializer(session)
|
val approximator = TypeApproximatorForMetadataSerializer(session)
|
||||||
val localDelegatedProperties = context.localDelegatedProperties[irClass.attributeOwnerId]?.map {
|
val localDelegatedProperties = context.localDelegatedProperties[irClass.attributeOwnerId]?.mapNotNull {
|
||||||
(it.owner.metadata as FirMetadataSource.Property).fir.copyToFreeProperty(approximator)
|
(it.owner.metadata as? FirMetadataSource.Property)?.fir?.copyToFreeProperty(approximator)
|
||||||
} ?: emptyList()
|
} ?: emptyList()
|
||||||
val firSerializerExtension = FirJvmSerializerExtension(
|
val firSerializerExtension = FirJvmSerializerExtension(
|
||||||
session, serializationBindings, context.state, irClass.metadata, localDelegatedProperties,
|
session, serializationBindings, context.state, irClass.metadata, localDelegatedProperties,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_INLINER_K2: IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
|
|
||||||
package x
|
package x
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_INLINER_K2: IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
package test
|
package test
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_INLINER_K2: IR
|
|
||||||
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
|
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
package test
|
package test
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_INLINER_K2: IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
package test
|
package test
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_INLINER_K2: IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
package test
|
package test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user