Files
kotlin/compiler/testData/codegen/box/casts/castGenericNull.kt
Mark Punzalan 5afab1ac2b [FIR] FIR2IR: Populate calls with type arguments and function type
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00

14 lines
187 B
Kotlin
Vendored

fun <T> castToString(t: T) {
t as String
}
fun box(): String {
try {
castToString<Any?>(null)
} catch (e: Exception) {
return "OK"
}
return "Fail"
}