K2: Add new tests for PCLA implementation
Many of them have been found & minimized at FP tests/user projects ^KT-59791 Fixed
This commit is contained in:
committed by
Space Team
parent
90feeab076
commit
7e4d9d9f64
+23
@@ -0,0 +1,23 @@
|
||||
// FIR_IDENTICAL
|
||||
class Controller<T> {
|
||||
fun yield(t: T): Boolean = true
|
||||
}
|
||||
|
||||
fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
|
||||
|
||||
interface Base
|
||||
interface Derived : Base
|
||||
|
||||
fun foo(
|
||||
base: Base,
|
||||
derived: Derived,
|
||||
) {
|
||||
val t = generate {
|
||||
twoBooleans(yield(base), yield(derived))
|
||||
}
|
||||
|
||||
// Should be Base, not just Derived
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Base")!>t<!>
|
||||
}
|
||||
|
||||
fun twoBooleans(x: Boolean, y: Boolean) {}
|
||||
Reference in New Issue
Block a user