[FIR] Calculate effective visibility inside anonymous object properly

#KT-38432 Fixed
This commit is contained in:
Mikhail Glukhikh
2020-04-21 11:16:43 +03:00
parent bb73681b62
commit 57b4a54766
23 changed files with 71 additions and 72 deletions
@@ -34,12 +34,12 @@ FILE: CallBasedInExpressionGenerator.kt
super<R|ERROR CLASS: Symbol not found, for `BranchedValue`|>(R|<local>/argument|, Null(null), R|<local>/argument|.<Unresolved name: type>#, <Unresolved name: Opcodes>#.<Unresolved name: IFEQ>#)
}
public final override fun putSelector(type: R|ERROR CLASS: Symbol not found, for `Type`|, kotlinType: R|ERROR CLASS: Symbol not found, for `KotlinType?`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|): R|kotlin/Unit| {
public[local] final override fun putSelector(type: R|ERROR CLASS: Symbol not found, for `Type`|, kotlinType: R|ERROR CLASS: Symbol not found, for `KotlinType?`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|): R|kotlin/Unit| {
this@R|/anonymous|.R|/anonymous.invokeFunction|(R|<local>/v|)
<Unresolved name: coerceTo>#(R|<local>/type|, R|<local>/kotlinType|, R|<local>/v|)
}
public final override fun condJump(jumpLabel: R|ERROR CLASS: Symbol not found, for `Label`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|, jumpIfFalse: R|kotlin/Boolean|): R|kotlin/Unit| {
public[local] final override fun condJump(jumpLabel: R|ERROR CLASS: Symbol not found, for `Label`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|, jumpIfFalse: R|kotlin/Boolean|): R|kotlin/Unit| {
this@R|/anonymous|.R|/anonymous.invokeFunction|(R|<local>/v|)
R|<local>/v|.<Unresolved name: visitJumpInsn>#(when () {
R|<local>/jumpIfFalse| -> {
@@ -11,7 +11,7 @@ FILE: enumEntryUse.kt
super<R|TestEnum|>()
}
public final fun foo(): R|kotlin/Unit| {
public[local] final fun foo(): R|kotlin/Unit| {
}
}
@@ -5,11 +5,11 @@ FILE: localImplicitBodies.kt
super<R|kotlin/Any|>()
}
public final fun sss(): R|kotlin/Int| {
public[local] final fun sss(): R|kotlin/Int| {
^sss this@R|/anonymous|.R|/anonymous.abc|()
}
public final fun abc(): R|kotlin/Int| {
public[local] final fun abc(): R|kotlin/Int| {
^abc Int(1)
}
@@ -7,7 +7,7 @@ FILE: localInnerClass.kt
super<R|kotlin/Any|>()
}
public final fun foo(): R|Foo| {
public[local] final fun foo(): R|Foo| {
^foo this@R|/anonymous|.R|/<anonymous>.Derived.Derived|(Int(42))
}
@@ -27,7 +27,7 @@ FILE: localScopes.kt
super<R|Bar|>()
}
public final fun baz(): R|kotlin/Unit| {
public[local] final fun baz(): R|kotlin/Unit| {
}
}
@@ -9,11 +9,11 @@ FILE: foo.kt
private get(): R|kotlin/Boolean|
private set(value: R|kotlin/Boolean|): R|kotlin/Unit|
public final fun bar(): R|kotlin/Boolean| {
public[local] final fun bar(): R|kotlin/Boolean| {
^bar this@R|/anonymous|.R|/anonymous.result|.R|kotlin/Boolean.not|()
}
public final override fun result(): R|kotlin/Boolean| {
public[local] final override fun result(): R|kotlin/Boolean| {
^result this@R|/anonymous|.R|/anonymous.result|
}
@@ -36,16 +36,16 @@ FILE: O.kt
super<R|Wrapper|>(this@R|/O.Derived.Some|.R|/O.Derived.Some.z|)
}
public final fun local(): R|kotlin/Unit| {
public[local] final fun local(): R|kotlin/Unit| {
lval y: R|ft<kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|()
}
public final val oo: R|anonymous| = object : R|kotlin/Any| {
public[local] final val oo: R|anonymous| = object : R|kotlin/Any| {
private constructor(): R|anonymous| {
super<R|kotlin/Any|>()
}
public final val zz: R|kotlin/Boolean| = this@R|/O.Derived.Some|.R|/O.Derived.Some.z|
public[local] final val zz: R|kotlin/Boolean| = this@R|/O.Derived.Some|.R|/O.Derived.Some.z|
public get(): R|kotlin/Boolean|
}
@@ -65,7 +65,7 @@ FILE: O.kt
super<R|kotlin/Any|>()
}
public final fun local(): R|kotlin/Unit| {
public[local] final fun local(): R|kotlin/Unit| {
lval y: R|ft<kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|()
}
@@ -9,7 +9,7 @@ FILE: privateObjectLiteral.kt
super<R|kotlin/Any|>()
}
public final fun foo(): R|kotlin/Int| {
public[local] final fun foo(): R|kotlin/Int| {
^foo Int(42)
}
@@ -25,7 +25,7 @@ FILE: privateObjectLiteral.kt
super<R|kotlin/Any|>()
}
public final fun foo(): R|kotlin/Int| {
public[local] final fun foo(): R|kotlin/Int| {
^foo Int(13)
}