[FIR] resolve delegate field return type in correct scope

We should resolve it in the same way as delegate constructor call
to avoid access to nested class scopes

^KT-63522 Fixed
^KT-63042
This commit is contained in:
Dmitrii Gridin
2023-11-16 17:51:16 +01:00
committed by Space Team
parent ab6b3a6047
commit 0b253dc815
31 changed files with 362 additions and 231 deletions
@@ -1,4 +1,4 @@
FILE: nestedNameClash3.fir.kt
FILE: nestedNameClash3.kt
package second
public final fun main(): R|kotlin/Unit| {
@@ -9,7 +9,7 @@ FILE: nestedNameClash3.fir.kt
}
)
R|<local>/data|.R|SubstitutionOverride<second/MyClass.foo: R|kotlin/Unit|>|()
R|<local>/data|.R|second/MyClass.foo|()
}
public abstract interface Base<A> : R|kotlin/Any| {
public open fun foo(): R|kotlin/Unit| {
@@ -21,7 +21,7 @@ FILE: nestedNameClash3.fir.kt
super<R|kotlin/Any|>()
}
private final field $$delegate_0: <ERROR TYPE REF: Wrong number of type arguments> = R|<local>/prop|
private final field $$delegate_0: R|second/Base<second/Base<kotlin/Int>>| = R|<local>/prop|
public final val prop: R|second/Base<second/Base<kotlin/Int>>| = R|<local>/prop|
public get(): R|second/Base<second/Base<kotlin/Int>>|