[FIR] Don't generated fake-overrides for private declarations of actualized super classes
^KT-58252 Fixed
This commit is contained in:
committed by
Space Team
parent
cfa481d38f
commit
e9c8be3b64
+34
@@ -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}"
|
||||
}
|
||||
Reference in New Issue
Block a user