FIR DFA: fork flow everywhere
In theory, forking persistent flows should be cheap because of object reuse, so the proposal here is to start from scratch and prove redundancy of forks on a case-by-case basis. Something something better safe than sorry. ^KT-28333 tag fixed-in-k2 ^KT-28489 tag fixed-in-k2
This commit is contained in:
@@ -41,7 +41,7 @@ fun test4(x: String?) {
|
||||
foo(
|
||||
id(if (true) run { p = null; n() } else run { n() }),
|
||||
1,
|
||||
run { p<!UNSAFE_CALL!>.<!>length; 123 } // Bad (p = null possible)
|
||||
run { <!SMARTCAST_IMPOSSIBLE!>p<!>.length; 123 } // Bad (p = null possible)
|
||||
)
|
||||
p<!UNSAFE_CALL!>.<!>length // Bad (p = null possible)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user