[FIR] Don't mangle FirFields as properties

The correct way to mangle a field is to just use its name.

This is a step towards fixing KT-57754. It will be fixed in
the next commit.
This commit is contained in:
Sergej Jaskiewicz
2023-06-15 20:29:31 +02:00
committed by Space Team
parent d73e44b89b
commit 1ac3355a41
3 changed files with 19 additions and 19 deletions
@@ -1126,7 +1126,20 @@ open class IrBasedFieldDescriptor(owner: IrField) : PropertyDescriptor, IrBasedD
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
}
fun IrField.toIrBasedDescriptor() = IrBasedFieldDescriptor(this)
class IrBasedDelegateFieldDescriptor(owner: IrField) : IrBasedFieldDescriptor(owner), IrImplementingDelegateDescriptor {
override val correspondingSuperType: KotlinType
get() = TODO("not implemented")
override val isDelegated: Boolean
get() = true
}
fun IrField.toIrBasedDescriptor() = if (origin == IrDeclarationOrigin.DELEGATE) {
IrBasedDelegateFieldDescriptor(this)
} else {
IrBasedFieldDescriptor(this)
}
class IrBasedErrorDescriptor(owner: IrErrorDeclaration) : IrBasedDeclarationDescriptor<IrErrorDeclaration>(owner) {
override fun getName(): Name = error("IrBasedErrorDescriptor.getName: Should not be reached")