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

22 lines
314 B
Kotlin
Vendored

fun foo(a: Boolean, b: Boolean): Int {
val x: Int
if (a) {
x = 1
}
when (b) {
true -> x = 2
false -> x = 3
}
return x
}
fun bar(a: Boolean, b: Boolean): Int {
val x: Int
if (a) {
x = 1
}
when (b) {
false -> x = 3
}
return x
}