enhance arguments (#3193)

fixes #3192
This commit is contained in:
Alex Lam S.L
2018-06-21 14:10:37 +08:00
committed by alexlamsl
parent 915c7e234d
commit 766a4147d4
4 changed files with 207 additions and 44 deletions

View File

@@ -1926,3 +1926,31 @@ issue_3146_4: {
}
expect_stdout: "PASS"
}
issue_3192: {
options = {
unused: true,
}
input: {
(function(a) {
console.log(a = "foo", arguments[0]);
})("bar");
(function(a) {
"use strict";
console.log(a = "foo", arguments[0]);
})("bar");
}
expect: {
(function(a) {
console.log(a = "foo", arguments[0]);
})("bar");
(function(a) {
"use strict";
console.log("foo", arguments[0]);
})("bar");
}
expect_stdout: [
"foo foo",
"foo bar",
]
}