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

20 lines
320 B
Kotlin
Vendored

// FIR_IDENTICAL
class Controller<T> {
fun yield(t: T): Boolean = true
}
fun <R> myRun(b: () -> R) {}
fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
fun foo(b: Boolean) {
generate {
myRun {
if (b) {
yield("")
}
}
Unit
}
}