Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt
T
2016-01-28 12:56:12 +03:00

9 lines
176 B
Kotlin
Vendored

// 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)
}