FIR CFG: add more uncaught exception paths

This commit is contained in:
Jinseong Jeon
2020-11-06 07:11:31 -08:00
committed by teamcityserver
parent 7b06885348
commit 440cf78884
8 changed files with 34 additions and 16 deletions
@@ -62,7 +62,7 @@ fun innerFinallyInitializes() {
}
// Properly initialized
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
x.inc()
} catch (e: java.lang.Exception) {
log()
}
@@ -87,12 +87,12 @@ fun innerFinallyInitializesOuterRethrows() {
}
// Properly initialized
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
x.inc()
} catch (e: java.lang.Exception) {
log()
throw e
}
// Guaranteed to be initialized because all catch-clauses are rethrowing
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
x.inc()
}
@@ -43,5 +43,5 @@ fun innerTryCatchInitializes() {
x = 42
}
// Here x=I because outer try-catch either exited normally (x=I) or catched exception (x=I, with reassingment, though)
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
x.inc()
}
@@ -30,5 +30,5 @@ fun innerTryCatchFinally() {
}
}
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
x.inc()
}