285d5d06c7
Variable can now be "exactly initialized", "may be initialized" and "not initialized". A set of relevant tests. Some fixed tests.
10 lines
164 B
Kotlin
Vendored
10 lines
164 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VALUE
|
|
|
|
fun foo(f: Boolean): Int {
|
|
val i: Int
|
|
when (f) {
|
|
true -> i = 1
|
|
}
|
|
<!VAL_REASSIGNMENT!>i<!> = 3
|
|
return i
|
|
} |