FIR CFG: add more uncaught exception paths
This commit is contained in:
committed by
teamcityserver
parent
7b06885348
commit
440cf78884
+3
-3
@@ -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()
|
||||
}
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
+1
-1
@@ -30,5 +30,5 @@ fun innerTryCatchFinally() {
|
||||
}
|
||||
}
|
||||
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
x.inc()
|
||||
}
|
||||
Reference in New Issue
Block a user