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