JVM_IR: Allow delegated companion objects.
This currently leads to a compilation error due to metadata generation.
This commit is contained in:
committed by
Alexander Udalov
parent
4ddd9f081b
commit
71604851fe
+1
-1
@@ -227,7 +227,7 @@ open class ClassCodegen protected constructor(
|
||||
|
||||
val descriptor = field.metadata?.descriptor
|
||||
if (descriptor != null) {
|
||||
val codegen = if (JvmAbi.isPropertyWithBackingFieldInOuterClass(descriptor)) {
|
||||
val codegen = if (field.origin != IrDeclarationOrigin.DELEGATE && JvmAbi.isPropertyWithBackingFieldInOuterClass(descriptor)) {
|
||||
companionObjectCodegen ?: error("Class with a property moved from the companion must have a companion:\n${irClass.dump()}")
|
||||
} else this
|
||||
codegen.visitor.serializationBindings.put(JvmSerializationBindings.FIELD_FOR_PROPERTY, descriptor, fieldType to fieldName)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
package test
|
||||
|
||||
interface T {
|
||||
|
||||
Reference in New Issue
Block a user