[FIR] Calculate effective visibility inside anonymous object properly
#KT-38432 Fixed
This commit is contained in:
+3
-3
@@ -51,7 +51,7 @@ FILE: localClassesWithImplicit.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
^foo R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
^ when () {
|
||||
@@ -68,7 +68,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Int| {
|
||||
public[local] final fun bar(): R|kotlin/Int| {
|
||||
^bar R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
R|<local>/b|.<Unresolved name: length>#
|
||||
@@ -77,7 +77,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public final fun baz(): R|kotlin/Int| {
|
||||
public[local] final fun baz(): R|kotlin/Int| {
|
||||
^baz Int(1)
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@ FILE: enum.kt
|
||||
super<R|SomeEnum|>(Q|O1|)
|
||||
}
|
||||
|
||||
public final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public[local] final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
^check Boolean(true)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ FILE: enum.kt
|
||||
super<R|SomeEnum|>(Q|O2|)
|
||||
}
|
||||
|
||||
public final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public[local] final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
^check ==(R|<local>/y|, Q|O2|)
|
||||
}
|
||||
|
||||
@@ -75,11 +75,11 @@ FILE: enum.kt
|
||||
super<R|EnumClass|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo Int(1)
|
||||
}
|
||||
|
||||
public final override val bar: R|kotlin/String| = String(a)
|
||||
public[local] final override val bar: R|kotlin/String| = String(a)
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -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| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+1
-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| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -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|
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -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|()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(1.0), Double(2.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Hello!!!))
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(3.0), Double(4.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Ola!!!))
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(5.0), Double(6.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Privet!!!))
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -4,20 +4,20 @@ FILE: implicitInAnonymous.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
public[local] final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
^foo this@R|/anonymous|.R|/anonymous.bar|(R|<local>/x|)
|
||||
}
|
||||
|
||||
public final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
public[local] final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
^bar CMP(>, this@R|/anonymous|.R|kotlin/Any.hashCode|().R|kotlin/Int.plus|(R|<local>/y|).R|kotlin/Int.compareTo|(Int(0)))
|
||||
}
|
||||
|
||||
public final val w: R|kotlin/Boolean|
|
||||
public[local] final val w: R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
^ this@R|/anonymous|.R|/anonymous.z|
|
||||
}
|
||||
|
||||
public final val z: R|kotlin/Boolean|
|
||||
public[local] final val z: R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
^ ==(this@R|/anonymous|.R|kotlin/Any.hashCode|(), Int(0))
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo R|<local>/x|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|/TestProperty|.R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|/TestProperty|.R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|special/anonymous|.R|/TestProperty.x|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ val case1 = object : A {
|
||||
hoo()
|
||||
}
|
||||
}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Child<!>.voo() {
|
||||
fun Child.voo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Base<!>.hoo() {
|
||||
fun Base.hoo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ class Case3() {
|
||||
}
|
||||
}
|
||||
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Child<!>.voo() {
|
||||
fun Child.voo() {
|
||||
val x = property
|
||||
}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Base<!>.hoo() {
|
||||
fun Base.hoo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun R|<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
public[local] 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|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.hoo|.R|/<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
@@ -43,14 +43,14 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|<anonymous>.Base| = this@R|/anonymous|.R|/<anonymous>.Base.Base|(R|/B.B|())
|
||||
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| {
|
||||
public[local] final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|<anonymous>.Child| = this@R|/anonymous|.R|/<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|/<anonymous>.Base.baseFun|()
|
||||
R|<local>/child|.R|/<anonymous>.Base.property|
|
||||
@@ -72,11 +72,11 @@ FILE: objectInnerClass.kt
|
||||
super<R|Case2.Base|>(R|/B.B|())
|
||||
}
|
||||
|
||||
public final fun R|Case2.Base|.zoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|Case2.Base|.zoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.zoo|.R|/Case2.Base.property|
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
public[local] final fun foo(): R|kotlin/Unit| {
|
||||
this@R|/anonymous|.R|/Case2.Base.baseFun|()
|
||||
lval x: R|B| = this@R|/anonymous|.R|/Case2.Base.property|
|
||||
(this@R|/anonymous|, this@R|/anonymous|).R|/anonymous.zoo|()
|
||||
@@ -147,11 +147,11 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun R|Case3.<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
public[local] 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|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.hoo|.R|/Case3.<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
@@ -168,14 +168,14 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|Case3.<anonymous>.Base| = R|/Case3.<anonymous>.Base.Base|(R|/B.B|())
|
||||
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| {
|
||||
public[local] final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|Case3.<anonymous>.Child| = R|/Case3.<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|/Case3.<anonymous>.Base.baseFun|()
|
||||
R|<local>/child|.R|/Case3.<anonymous>.Base.property|
|
||||
|
||||
Reference in New Issue
Block a user