fda47c45ec
`FakeOverrideBuilder.provideFakeOverrides` recursively changes overrides for all superclasses in the hierarchy, including lazy IR, which is a lot of extra work. Also it leads to some tests failing in the IR fake override builder mode because it changes correct fake overrides of Java classes to incorrect ones. Those tests are unmuted but it doesn't mean they are fixed -- most likely we'll generate fake overrides via IR for lazy IR too, at which point they'll start to fail again.
27 lines
488 B
Kotlin
Vendored
27 lines
488 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// ISSUE: KT-59550
|
|
|
|
// FILE: Intermediate.java
|
|
public class Intermediate extends Base {
|
|
public Intermediate(String foo) {
|
|
super(foo);
|
|
}
|
|
}
|
|
|
|
// FILE: FinalAndBase.kt
|
|
abstract class Base(private var foo: String) {
|
|
fun getFoo() = foo
|
|
|
|
fun setFoo(newFoo: String) {
|
|
foo = newFoo
|
|
}
|
|
}
|
|
|
|
class Final(val i: Intermediate) : Intermediate(i.foo)
|
|
|
|
fun box(): String {
|
|
val f = Final(Intermediate(""))
|
|
f.foo = "OK"
|
|
return f.foo
|
|
}
|