Retain data flow info after conditions in do-while statements

This commit is contained in:
Alexander Udalov
2012-11-13 18:38:21 +04:00
parent b0e9c7aab7
commit 0b1c87a812
3 changed files with 23 additions and 2 deletions
@@ -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
}