Control flow analysis: nested finally blocks now appear in correct order in CFG #KT-4764 Fixed
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
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 {
|
||||
println(foo) // Variable 'foo' must be initialized
|
||||
}
|
||||
}
|
||||
return "fail"
|
||||
}
|
||||
}
|
||||
} finally {}
|
||||
return null
|
||||
}
|
||||
Reference in New Issue
Block a user