Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt
T

10 lines
193 B
Kotlin
Vendored

// FIR_IDENTICAL
// See KT-9529 Smart cast causes code to be incompilable
fun <T : Any> foo(o: T): Collection<T> {
if (o is String) {
return listOf(o)
}
return listOf(o)
}