[FIR] treat constructors of local classes as local declarations

The main problem: we are trying to lazily resolve local declaration

^KT-58546
^KT-58490
This commit is contained in:
Dmitrii Gridin
2023-05-08 18:03:04 +02:00
committed by Space Team
parent 388634e47d
commit ae88726fae
23 changed files with 603 additions and 33 deletions
@@ -7,5 +7,5 @@ FILE: localConstructor.kt
}
lval l: R|Local| = R|/Local.Local|()
lval l: R|Local| = R|<local>/Local.Local|()
}
@@ -8,7 +8,7 @@ FILE: localInnerClass.kt
}
public final fun foo(): R|Foo| {
^foo this@R|/<anonymous>|.R|/<anonymous>.Derived.Derived|(Int(42))
^foo this@R|/<anonymous>|.R|<local>/<anonymous>.Derived.Derived|(Int(42))
}
local final inner class Derived : R|Foo| {
@@ -19,7 +19,7 @@ FILE: localScopes.kt
}
lval base: R|BaseLocal| = R|/BaseLocal.BaseLocal|()
lval base: R|BaseLocal| = R|<local>/BaseLocal.BaseLocal|()
R|<local>/base|.R|<local>/baz|()
R|<local>/base|.R|/Bar.foo|()
lval anonymous: R|<anonymous>| = object : R|Bar| {
@@ -44,7 +44,7 @@ FILE: localScopes.kt
}
lval derived: R|DerivedLocal| = R|/DerivedLocal.DerivedLocal|()
lval derived: R|DerivedLocal| = R|<local>/DerivedLocal.DerivedLocal|()
R|<local>/derived|.R|<local>/gau|()
R|<local>/derived|.R|<local>/baz|()
R|<local>/derived|.R|/Bar.foo|()
@@ -72,7 +72,7 @@ FILE: first.kt
public final fun baz(): R|kotlin/Unit| {
this@R|/Local|.R|<local>/bar|()
this@R|/Local|.R|/Local.Inner.Inner|()
this@R|/Local|.R|<local>/Local.Inner.Inner|()
}
local final inner class Inner : R|kotlin/Any| {
@@ -88,8 +88,8 @@ FILE: first.kt
}
R|/Local.Local|().R|<local>/baz|()
R|/Local.Local|().R|<local>/bar<HIDDEN: <local>/bar is invisible>#|()
R|<local>/Local.Local|().R|<local>/baz|()
R|<local>/Local.Local|().R|<local>/bar<HIDDEN: <local>/bar is invisible>#|()
}
public final fun test(): R|kotlin/Unit| {
R|/foo|()