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

24 lines
507 B
Kotlin
Vendored

class Controller<T> {
fun yield(t: T): Boolean = true
fun get(): T = TODO()
}
fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
fun bar(x: Any) {}
fun <R> myWith(r: R, b: (R) -> Unit) {}
fun main() {
generate {
// S <: Any
bar(get())
// S <: R
// Any <: R
myWith(get()) {
it.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>length<!>
}
yield("")
}.length
}