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
This commit is contained in:
pyos
2021-08-23 13:48:23 +02:00
committed by TeamCityServer
parent 9a472c418f
commit 7ce5556de3
15 changed files with 231 additions and 102 deletions
@@ -0,0 +1,11 @@
// 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()()