Retain data flow info after conditions in do-while statements
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
fun simpleDoWhile(x: Int?, var y: Int) {
|
||||
do {
|
||||
x : Int?
|
||||
y++
|
||||
} while (x!! == y)
|
||||
x : Int
|
||||
}
|
||||
|
||||
fun doWhileWithBreak(x: Int?, var y: Int) {
|
||||
do {
|
||||
x : Int?
|
||||
y++
|
||||
if (y > 0) break
|
||||
} while (x!! == y)
|
||||
<!TYPE_MISMATCH!>x<!> : Int
|
||||
}
|
||||
Reference in New Issue
Block a user