[Fir2IR] Don't use FIR f/o builder when IR f/o builder is enabled
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
This commit is contained in:
committed by
Space Team
parent
74193aefb4
commit
9532172a22
@@ -0,0 +1,19 @@
|
||||
// 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" })
|
||||
Reference in New Issue
Block a user