fix corner case in collapse_vars (#3591)
This commit is contained in:
@@ -6238,7 +6238,7 @@ issue_3439_2: {
|
||||
expect_stdout: "number"
|
||||
}
|
||||
|
||||
cond_sequence_return: {
|
||||
cond_sequence_return_1: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
}
|
||||
@@ -6259,6 +6259,27 @@ cond_sequence_return: {
|
||||
expect_stdout: "2"
|
||||
}
|
||||
|
||||
cond_sequence_return_2: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function(n) {
|
||||
var c = 0;
|
||||
for (var k in [0, 1])
|
||||
if (c += 1, k == n) return c;
|
||||
}(1));
|
||||
}
|
||||
expect: {
|
||||
console.log(function(n) {
|
||||
var c = 0;
|
||||
for (var k in [0, 1])
|
||||
if (c += 1, k == n) return c;
|
||||
}(1));
|
||||
}
|
||||
expect_stdout: "2"
|
||||
}
|
||||
|
||||
issue_3520: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
|
||||
Reference in New Issue
Block a user