Files
kotlin/compiler/testData/codegen/patternMatching/nullableWhen.kt

11 lines
158 B
Kotlin

fun f(p: Int?): Int {
return when(p) {
null -> 3
else -> p!!
}
}
fun box(): String {
return if (f(null) == 3) "OK" else "fail"
}