[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:
Dmitriy Novozhilov
2023-10-05 12:39:13 +03:00
committed by Space Team
parent 22f55b3dc4
commit 3d6ec0ec75
96 changed files with 417 additions and 2062 deletions
@@ -54,12 +54,11 @@ class TestJFoo : IFoo {
}
private /* final field */ val $$delegate_0: JFoo = JFoo()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: JFoo = JFoo()
}
class TestK1 : IFoo {
@@ -69,12 +68,11 @@ class TestK1 : IFoo {
}
private /* final field */ val $$delegate_0: K1 = K1()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: K1 = K1()
}
class TestK2 : IFoo {
@@ -84,12 +82,11 @@ class TestK2 : IFoo {
}
private /* final field */ val $$delegate_0: K2 = K2()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
private /* final field */ val $$delegate_0: K2 = K2()
}
class TestK3 : IFoo {
@@ -99,12 +96,11 @@ class TestK3 : IFoo {
}
private /* final field */ val $$delegate_0: K3 = K3()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
private /* final field */ val $$delegate_0: K3 = K3()
}
class TestK4 : IFoo {
@@ -114,11 +110,10 @@ class TestK4 : IFoo {
}
private /* final field */ val $$delegate_0: K4 = K4()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: K4 = K4()
}