Skip to content

Commit

Permalink
test #833 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosantoscode committed May 8, 2023
1 parent 58e1d6f commit 765c1fe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/compress/if_return.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,3 +528,28 @@ if_return_same_value: {
function h() { return (foo || bar) ? x() : y() }
}
}

issue_t833: {
options = {
if_return: true,
}
input: {
var a = id(1), object = {PASS: 1};
for (var p in object) {
if (a) {
test(); continue;
function test() {console.log(p)}
}
}
}
expect: {
var a = id(1), object = {PASS: 1};
for (var p in object)
if (a) {
test();
continue;
function test(){console.log(p)}
}
}
expect_stdout: "PASS"
}

0 comments on commit 765c1fe

Please sign in to comment.