[FIR2IR] Automatically store IR declaration in its parent upon creation
Previously, creating a declaration with Fir2IrCallableDeclarationsGenerator/ Fir2IrClassifiersGenerator didn't guarantee that this declaration will be actually added to the list of parent class/file declarations, which lead to situations when FIR2IR created some declarations in the air (mostly fake-overrides)
This commit is contained in:
committed by
Space Team
parent
22f55b3dc4
commit
3d6ec0ec75
+4
-4
@@ -40,6 +40,10 @@ FILE fqName:<root> fileName:/substitutionOverrideWithDelegate.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DelegatedB modality:OPEN visibility:public superTypes:[<root>.B<kotlin.String>]'
|
||||
FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C<kotlin.String> origin=null
|
||||
<class: T>: kotlin.String
|
||||
FUN DELEGATED_MEMBER name:invoke visibility:public modality:OPEN <> ($this:<root>.DelegatedB) returnType:kotlin.Unit [operator]
|
||||
overridden:
|
||||
public open fun invoke (): kotlin.Unit declared in <root>.B
|
||||
@@ -58,10 +62,6 @@ FILE fqName:<root> fileName:/substitutionOverrideWithDelegate.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]' type=<root>.C<kotlin.String> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DelegatedB declared in <root>.DelegatedB.invoke' type=<root>.DelegatedB origin=null
|
||||
value: GET_VAR 'value: kotlin.String declared in <root>.DelegatedB.invoke' type=kotlin.String origin=null
|
||||
FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C<kotlin.String> origin=null
|
||||
<class: T>: kotlin.String
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B
|
||||
|
||||
Reference in New Issue
Block a user