More precise value reassignment analysis. #KT-7418 Fixed. #KT-6902 Fixed.
Variable can now be "exactly initialized", "may be initialized" and "not initialized". A set of relevant tests. Some fixed tests.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VALUE
|
||||
|
||||
fun foo(f: Boolean): Int {
|
||||
val i: Int
|
||||
if (f) {
|
||||
i = 1
|
||||
}
|
||||
<!VAL_REASSIGNMENT!>i<!> = 3
|
||||
return i
|
||||
}
|
||||
Reference in New Issue
Block a user