FIR DFA: when joining flows, clear reassigned vars with no statements
For example:
val c = C("...")
val x = c.x // alias to variable for c.x, which depends on c
if (x == null) return
// now c.x has type Any
c = C(null)
// c has been reassigned => info for c.x is no longer valid;
// c itself has never had any statements made about it, but
// we must still call removeAllAboutVariable to clear the
// dependents
This commit is contained in:
+1
-1
@@ -36,5 +36,5 @@ fun test3(p: Boolean) {
|
||||
c = C(null)
|
||||
}
|
||||
x.length // ok
|
||||
c.x.length // bad
|
||||
c.x<!UNSAFE_CALL!>.<!>length // bad
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user