Files
kotlin/compiler/testData/codegen/box/nullCheckOptimization/isNullable.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

4 lines
120 B
Kotlin
Vendored

inline fun <reified T> isNullable() = null is T
fun box(): String =
if (isNullable<String?>()) "OK" else "Fail"