Files
kotlin-fork/compiler/testData/codegen/box/syntheticAccessors/protectedSuper.kt
T
pyos 7ce5556de3 JVM_IR: try to fix SyntheticAccessorLowering.isAccessible again
The condition on the relationship between the current class and the type
of the receiver for protected members was the opposite of what the JVMS
says, and yet somehow mostly worked?

 #KT-48331 Fixed
 #KT-20542 Fixed
2021-09-03 15:54:16 +03:00

12 lines
225 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
open class C {
protected open fun foo() = "OK"
}
class D : C() {
// same package, but `super` needs to be related by class hierarchy:
fun bar() = { super.foo() }
}
fun box() = D().bar()()