[FIR] Don't generated fake-overrides for private declarations of actualized super classes

^KT-58252 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-04-26 15:54:55 +03:00
committed by Space Team
parent cfa481d38f
commit e9c8be3b64
17 changed files with 124 additions and 0 deletions
@@ -0,0 +1,34 @@
// LANGUAGE: +MultiPlatformProjects
// WITH_STDLIB
// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6
// JS tests don't support MPP modules compilation
// ISSUE: KT-58252
// MODULE: lib-common
// FILE: common.kt
package foo
interface Base<T : Any> {
val capacity: Int
}
expect abstract class Derived<T : Any>(capacity: Int) : Base<T> {
final override val capacity: Int
}
internal val ByteArrayPool = object : Derived<ByteArray>(128) {}
// MODULE: lib()()(lib-common)
// FILE: platform.kt
package foo
actual abstract class Derived<T : Any>
actual constructor(actual final override val capacity: Int) : Base<T> {
private val instances = arrayOfNulls<Any?>(capacity)
}
fun box(): String {
return if (ByteArrayPool.capacity == 128) "OK" else "Error: ${ByteArrayPool.capacity}"
}