Files
kotlin-fork/compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt
T

11 lines
207 B
Kotlin
Vendored

// FIR_IDENTICAL
// See also: KT-3743
fun foo(arg: Boolean?): String {
// Must be exhaustive
return when(arg) {
true -> "truth"
false -> "falsehood"
null -> "unknown"
}
}