[FIR2IR] Generate fake overrides for synthetic properties

This fixes "IllegalStateException: Fir2IrSimpleFunctionSymbol for
<paramName> is already bound" when creating a callable reference to a
synthetic property

^KT-56072 Fixed
This commit is contained in:
Kirill Rakhman
2023-01-31 18:48:43 +01:00
committed by Space Team
parent b25e460beb
commit e81f34d4b0
4 changed files with 65 additions and 0 deletions
@@ -15,6 +15,16 @@ CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:AX modality:ABSTRACT visibili
overridden:
public abstract fun getA (): @[FlexibleNullability] <root>.X? declared in <root>.X
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:<root>.AX
PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val]
overridden:
public abstract a: <root>.A? [val]
FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:<get-a> visibility:public modality:OPEN <> ($this:<root>.AX) returnType:@[FlexibleNullability] <root>.AX?
annotations:
Override
correspondingProperty: PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-a> (): <root>.A? declared in <root>.A
$this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name:<this> type:<root>.AX
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:<root>.AX, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.A