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.
26 lines
408 B
Kotlin
Vendored
26 lines
408 B
Kotlin
Vendored
// !JVM_DEFAULT_MODE: enable
|
|
// TARGET_BACKEND: JVM
|
|
// JVM_TARGET: 1.8
|
|
// WITH_RUNTIME
|
|
|
|
interface Test {
|
|
fun test(): String {
|
|
return privateFun() + privateProp
|
|
}
|
|
|
|
@JvmDefault
|
|
private fun privateFun(): String {
|
|
return "O"
|
|
}
|
|
|
|
@JvmDefault
|
|
private val privateProp: String
|
|
get() = "K"
|
|
}
|
|
|
|
class TestImpl: Test
|
|
|
|
fun box(): String {
|
|
return TestImpl().test()
|
|
}
|