Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/builderInference/whenWithPropertyHavingSomePCLACallsWithinInitializer.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

27 lines
552 B
Kotlin
Vendored

// FIR_IDENTICAL
interface Controller<F> {
fun yield(t: F)
}
fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
fun foo(b: Boolean, buffer: Collection<String>) {
generate {
if (b) {
val x: String = myLaunch {
myRun {
yield(buffer.toTypedArray2())
}
}
}
}.get(0).length
}
fun <E> Collection<E>.toTypedArray2(): Array<E> = TODO()
fun myLaunch(
block: () -> Unit
): String = TODO()
fun myRun(action: () -> Unit): Unit = TODO()