[FIR] Add more corner cases for KT-65058

^KT-65058
This commit is contained in:
Nikolay Lunyak
2024-01-30 16:35:11 +02:00
committed by Space Team
parent 4ee03a3a0c
commit 811e8d7c3b
2 changed files with 26 additions and 1 deletions
@@ -0,0 +1,19 @@
// ISSUE: KT-65058
open class A {
protected fun foo() {
}
}
<!NOTHING_TO_INLINE!>inline<!> fun bar() = object : A() {
fun baz() {
foo()
this.foo()
val receiver: A = this
receiver.<!INVISIBLE_REFERENCE, PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR!>foo<!>()
val receiver2 = this
receiver2.foo()
}
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// ISSUE: KT-65058
open class A {
@@ -9,5 +8,12 @@ open class A {
<!NOTHING_TO_INLINE!>inline<!> fun bar() = object : A() {
fun baz() {
foo()
this.foo()
val receiver: A = this
receiver.<!INVISIBLE_MEMBER, PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR!>foo<!>()
val receiver2 = this
receiver2.foo()
}
}