Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/commonSystem/kt31969.kt
T

14 lines
201 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !WITH_NEW_INFERENCE
open class View
fun test() {
val target = foo<View>() ?: foo() ?: run {}
}
fun <T : View> foo(): T? {
return null
}