FIR DFA: align FirLocalVariableAssignmentAnalyzer with the graph builder
I.e. maintain a set of seen lambdas where each marked as either "data flow only" or "both data and control flow". The latter are truly parallel with the function being analyzed, while the former have technically already terminated, we just don't know the types inside them because they may not have been analyzed yet.
This commit is contained in:
+12
-1
@@ -10,7 +10,7 @@ fun test_1() {
|
||||
foo(
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length, // stable smartcast
|
||||
run { x = "" },
|
||||
<!SMARTCAST_IMPOSSIBLE!>x<!>.length // stable smartcast
|
||||
<!SMARTCAST_IMPOSSIBLE!>x<!>.length // can be stable smartcast
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -36,3 +36,14 @@ fun test_3() {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun test_4() {
|
||||
var x: String? = null
|
||||
if (x != null) {
|
||||
foo(
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length, // stable smartcast
|
||||
run { x = null },
|
||||
<!SMARTCAST_IMPOSSIBLE!>x<!>.length // either unstable or not a smartcast
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user