diff --git a/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt b/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt new file mode 100644 index 00000000000..d9744cec6e9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt @@ -0,0 +1,19 @@ +// ISSUE: KT-65058 + +open class A { + protected fun foo() { + } +} + +inline fun bar() = object : A() { + fun baz() { + foo() + this.foo() + + val receiver: A = this + receiver.foo() + + val receiver2 = this + receiver2.foo() + } +} diff --git a/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt b/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt index bfe9a97c751..05bb8b7a5d2 100644 --- a/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt +++ b/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // ISSUE: KT-65058 open class A { @@ -9,5 +8,12 @@ open class A { inline fun bar() = object : A() { fun baz() { foo() + this.foo() + + val receiver: A = this + receiver.foo() + + val receiver2 = this + receiver2.foo() } }