Fix for KT-9022: Wrong result when use break in if condition

#KT-9022 Fixed
This commit is contained in:
Michael Bogdanov
2015-11-11 13:17:18 +03:00
parent 20ca8cd435
commit 3f995935d3
6 changed files with 125 additions and 33 deletions
@@ -0,0 +1,9 @@
fun box(): String {
var cycle = true;
while (true) {
if (true && break) {
return "fail"
}
}
return "OK"
}
@@ -0,0 +1,9 @@
fun box(): String {
var cycle = true;
while (true) {
if (true || break) {
return "OK"
}
}
return "fail"
}