[FIR] Improve the control flow graph around try expressions
1. throw goes to catches instead of main exist block 2. return goes via finally (single level only supported atm) 3. collect non-direct return to retrieve all return expressions easier
This commit is contained in:
committed by
teamcityserver
parent
7b6dddf012
commit
06b23d5937
Vendored
+2
-2
@@ -113,7 +113,7 @@ fun t7() : Int {
|
||||
catch (<!THROWABLE_TYPE_MISMATCH!>e : Any<!>) {
|
||||
2
|
||||
}
|
||||
<!UNREACHABLE_CODE!>return 1<!> // this is OK, like in Java
|
||||
return 1 // this is OK, like in Java
|
||||
}
|
||||
|
||||
fun t8() : Int {
|
||||
@@ -123,7 +123,7 @@ fun t8() : Int {
|
||||
}
|
||||
catch (<!THROWABLE_TYPE_MISMATCH!>e : Any<!>) {
|
||||
return 1
|
||||
2
|
||||
<!UNREACHABLE_CODE!>2<!>
|
||||
}
|
||||
<!UNREACHABLE_CODE!>return 1<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user