7ce5556de3
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
12 lines
225 B
Kotlin
Vendored
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()()
|