Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/kt32358_3.kt
T
Pavel Kirpichenkov 3fcf3d6fea Add regression tests
KT-32358
2020-01-15 14:39:40 +03:00

11 lines
251 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// no inline modifier
fun <R> callIt(fn: () -> R): R = TODO()
fun smartIt(p1: String?, p2: String?) {
p1 ?: callIt { TODO() }
<!DEBUG_INFO_SMARTCAST!>p1<!>.length // smartcast
}