Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/builderInference/callableReferenceInsideInvokeCall.kt
T
Denis.Zharkov 7e4d9d9f64 K2: Add new tests for PCLA implementation
Many of them have been found & minimized at FP tests/user projects

^KT-59791 Fixed
2024-01-10 14:56:31 +00:00

16 lines
454 B
Kotlin
Vendored

// 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
}