9532172a22
Before this commit, fir f/o builder was inconsistently disabled in some places, while it should work only for lazy declarations Attempt to use it for non-lazy declarations, without maintaining invariant, that it would also be used for super classes led to unpredictable results. This commit introduces opt-in, and marks all related API to three types * Propagate error to user * Fine to use, as it's checked if ir f/o builder is enabled * Fine to use, as it is definitely a lazy class. Several cases of missing checks was fixed. ^KT-65707
19 lines
288 B
Kotlin
Vendored
19 lines
288 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// FILE: A.java
|
|
public interface A {
|
|
String f();
|
|
}
|
|
|
|
// FILE: B.kt
|
|
interface B : A
|
|
|
|
// FILE: C.java
|
|
public interface C extends B { }
|
|
|
|
// FILE: CImpl.kt
|
|
class CImpl(p: C) : C by p
|
|
|
|
// FILE: box.kt
|
|
fun g(c: C): String = c.f()
|
|
|
|
fun box(): String = g(CImpl { "OK" }) |