FIR: handle member scope for anonymous objects

#KT-37120 fixed
This commit is contained in:
Ilya Kirillov
2020-04-22 11:58:32 +03:00
parent fdfb544730
commit 1a90866ce1
6 changed files with 89 additions and 67 deletions
@@ -4,30 +4,30 @@ FILE: objectInnerClass.kt
super<R|kotlin/Any|>()
}
local final inner class Child : R|ERROR CLASS: Symbol not found, for `Base`| {
local final inner class Child : R|<anonymous>.Base| {
public[local] constructor(property: R|B|): R|<anonymous>.Child| {
super<R|ERROR CLASS: Symbol not found, for `Base`|>(R|<local>/property|)
super<R|<anonymous>.Base|>(R|<local>/property|)
}
public[local] final fun R|ERROR CLASS: Symbol not found, for `Base`|.zoo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public[local] final fun R|<anonymous>.Base|.zoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.Child.zoo|.R|/<anonymous>.Base.property|
}
public[local] final fun foo(): R|kotlin/Unit| {
<Unresolved name: baseFun>#()
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
<Unresolved name: zoo>#()
this@R|/<anonymous>.Child|.R|/<anonymous>.Base.baseFun|()
lval x: R|B| = this@R|/<anonymous>.Child|.R|/<anonymous>.Base.property|
(this@R|/<anonymous>.Child|, this@R|/<anonymous>.Child|).R|/<anonymous>.Child.zoo|()
(this@R|/anonymous|, this@R|/<anonymous>.Child|).R|/anonymous.hoo|()
}
}
public final fun R|ERROR CLASS: Symbol not found, for `Child`|.voo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public final fun R|<anonymous>.Child|.voo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/anonymous.voo|.R|/<anonymous>.Base.property|
}
public final fun R|ERROR CLASS: Symbol not found, for `Base`|.hoo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public final fun R|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/anonymous.hoo|.R|/<anonymous>.Base.property|
}
local open inner class Base : R|kotlin/Any| {
@@ -45,16 +45,16 @@ FILE: objectInnerClass.kt
public final fun caseForBase(): R|kotlin/Unit| {
lval base: R|<anonymous>.Base| = this@R|/anonymous|.R|/<anonymous>.Base.Base|(R|/B.B|())
R|<local>/base|.<Unresolved name: baseFun>#()
R|<local>/base|.<Unresolved name: property>#
R|<local>/base|.R|/<anonymous>.Base.baseFun|()
R|<local>/base|.R|/<anonymous>.Base.property|
(this@R|/anonymous|, R|<local>/base|).R|/anonymous.hoo|()
}
public final fun caseForChild(): R|kotlin/Unit| {
lval child: R|<anonymous>.Child| = this@R|/anonymous|.R|/<anonymous>.Child.Child|(R|/B.B|())
R|<local>/child|.<Unresolved name: baseFun>#()
R|<local>/child|.<Unresolved name: property>#
R|<local>/child|.<Unresolved name: foo>#()
R|<local>/child|.R|/<anonymous>.Base.baseFun|()
R|<local>/child|.R|/<anonymous>.Base.property|
R|<local>/child|.R|/<anonymous>.Child.foo|()
(this@R|/anonymous|, R|<local>/child|).R|/anonymous.hoo|()
(this@R|/anonymous|, R|<local>/child|).R|/anonymous.voo|()
}
@@ -129,30 +129,30 @@ FILE: objectInnerClass.kt
super<R|kotlin/Any|>()
}
local final inner class Child : R|ERROR CLASS: Symbol not found, for `Base`| {
local final inner class Child : R|Case3.<anonymous>.Base| {
public[local] constructor(property: R|B|): R|Case3.<anonymous>.Child| {
super<R|ERROR CLASS: Symbol not found, for `Base`|>(R|<local>/property|)
super<R|Case3.<anonymous>.Base|>(R|<local>/property|)
}
public[local] final fun R|ERROR CLASS: Symbol not found, for `Base`|.zoo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public[local] final fun R|Case3.<anonymous>.Base|.zoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/Case3.<anonymous>.Child.zoo|.R|/Case3.<anonymous>.Base.property|
}
public[local] final fun foo(): R|kotlin/Unit| {
<Unresolved name: baseFun>#()
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
<Unresolved name: zoo>#()
this@R|/Case3.<anonymous>.Child|.R|/Case3.<anonymous>.Base.baseFun|()
lval x: R|B| = this@R|/Case3.<anonymous>.Child|.R|/Case3.<anonymous>.Base.property|
(this@R|/Case3.<anonymous>.Child|, this@R|/Case3.<anonymous>.Child|).R|/Case3.<anonymous>.Child.zoo|()
(this@R|/anonymous|, this@R|/Case3.<anonymous>.Child|).R|/anonymous.hoo|()
}
}
public final fun R|ERROR CLASS: Symbol not found, for `Child`|.voo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public final fun R|Case3.<anonymous>.Child|.voo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/anonymous.voo|.R|/Case3.<anonymous>.Base.property|
}
public final fun R|ERROR CLASS: Symbol not found, for `Base`|.hoo(): R|kotlin/Unit| {
lval x: <ERROR TYPE REF: Unresolved name: property> = <Unresolved name: property>#
public final fun R|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/anonymous.hoo|.R|/Case3.<anonymous>.Base.property|
}
local open inner class Base : R|kotlin/Any| {
@@ -170,16 +170,16 @@ FILE: objectInnerClass.kt
public final fun caseForBase(): R|kotlin/Unit| {
lval base: R|Case3.<anonymous>.Base| = R|/Case3.<anonymous>.Base.Base|(R|/B.B|())
R|<local>/base|.<Unresolved name: baseFun>#()
R|<local>/base|.<Unresolved name: property>#
R|<local>/base|.R|/Case3.<anonymous>.Base.baseFun|()
R|<local>/base|.R|/Case3.<anonymous>.Base.property|
(this@R|/anonymous|, R|<local>/base|).R|/anonymous.hoo|()
}
public final fun caseForChild(): R|kotlin/Unit| {
lval child: R|Case3.<anonymous>.Child| = R|/Case3.<anonymous>.Child.Child|(R|/B.B|())
R|<local>/child|.<Unresolved name: baseFun>#()
R|<local>/child|.<Unresolved name: property>#
R|<local>/child|.<Unresolved name: foo>#()
R|<local>/child|.R|/Case3.<anonymous>.Base.baseFun|()
R|<local>/child|.R|/Case3.<anonymous>.Base.property|
R|<local>/child|.R|/Case3.<anonymous>.Child.foo|()
(this@R|/anonymous|, R|<local>/child|).R|/anonymous.hoo|()
(this@R|/anonymous|, R|<local>/child|).R|/anonymous.voo|()
}