Control flow analysis: nested finally blocks now appear in correct order in CFG #KT-4764 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-04-19 18:01:08 +03:00
parent a5b428d9ce
commit d24528f6bb
9 changed files with 257 additions and 1 deletions
@@ -0,0 +1,24 @@
fun use(arg: String?) = arg
fun sample(): String? {
try {
if (false) {
return "fail"
} else {
if (false) {
if (false) {
var foo: String? = null
try {
foo = "test"
} catch (e: Exception) {
return "fail"
} finally {
use(foo) // 'foo' is initialized here
}
}
return "fail"
}
}
} finally {}
return null
}