c0152ccf0f
Unfortunately, it's not enough to know direct overriddens to correctly build fake overrides. This mean, that we need to know whole overridden tree during the process of building. It happens automatically for normal classes, but not for lazy classes, as their overriddens are built separatly. This commit enforces correct overrddens for lazy classes in hierarhies at the point, where they should be normally computed. ^KT-65236
35 lines
620 B
Kotlin
Vendored
35 lines
620 B
Kotlin
Vendored
// NATIVE error: static cache is broken: ld.gold invocation reported errors. Please try to disable compiler caches and rerun the build.
|
|
// DONT_TARGET_EXACT_BACKEND: NATIVE
|
|
// IGNORE_BACKEND: JS_IR, JS_IR_ES6
|
|
|
|
// KT-65416
|
|
// IGNORE_BACKEND_K2: WASM
|
|
|
|
// MODULE: lib
|
|
// FILE: 2.kt
|
|
abstract class A {
|
|
protected val value = "OK"
|
|
}
|
|
|
|
abstract class B : A() {
|
|
val ok get() = value
|
|
}
|
|
|
|
// FILE: 3.kt
|
|
abstract class C : B()
|
|
|
|
// MODULE: main(lib)
|
|
// FILE: 1.kt
|
|
class D : C()
|
|
|
|
fun box(): String = D().ok
|
|
|
|
// FILE: 2.kt
|
|
abstract class A {
|
|
protected val value = "OK"
|
|
}
|
|
|
|
abstract class B : A() {
|
|
val ok get() = value
|
|
}
|