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:
Denis.Zharkov
2023-12-19 17:13:35 +01:00
committed by Space Team
parent 90feeab076
commit 7e4d9d9f64
87 changed files with 2776 additions and 60 deletions
@@ -0,0 +1,15 @@
// FIR_IDENTICAL
fun <X> mySuspendable(block: (MyContinuation<X>) -> Unit): X = TODO()
interface MyContinuation<in Y> {
fun cancel(): Unit
}
fun <Z> MyContinuation<Z>.resume(value: Z) {}
fun cancelOrProceed(handler: (cancel: () -> Unit, proceed: () -> Unit) -> Unit) {
mySuspendable { x ->
// Was exception: Expected expression 'FirCallableReferenceAccessImpl' to be resolved
handler(x::cancel) { x.resume("") }
}.length
}