334cab7357
The only case we may need fake override for private members is a situation when class refers itself with different type arguments. So in this commit we forbid such fake overrides when we can prove that class does not refers itself here.
22 lines
244 B
Kotlin
Vendored
22 lines
244 B
Kotlin
Vendored
var result = "fail"
|
|
|
|
interface B {
|
|
|
|
private fun test() {
|
|
result = "OK"
|
|
}
|
|
|
|
class Z {
|
|
fun ztest(b: B) {
|
|
b.test()
|
|
}
|
|
}
|
|
}
|
|
|
|
class C : B
|
|
|
|
fun box(): String {
|
|
B.Z().ztest(C())
|
|
return result
|
|
}
|