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

18 lines
301 B
Kotlin
Vendored

class Controller<T2>
fun <T1> generate(
block: (Controller<T1>) -> Unit
): T1 = TODO()
fun <E3> foobar(
cont: Controller<E3>
) {}
fun foo() {
generate { cont ->
foobar(cont <!USELESS_CAST!>as Controller<String><!>)
baz(cont)
}
}
fun baz(cont: Controller<String>) {}