fix corner case in reduce_vars (#4563)

fixes #4562
This commit is contained in:
Alex Lam S.L
2021-01-17 17:47:07 +00:00
committed by GitHub
parent 8d21516623
commit e616916de5
4 changed files with 41 additions and 18 deletions

View File

@@ -1,14 +1,12 @@
// (beautified)
try {
1 in 0;
} catch ({
message: message
}) {
} catch (message) {
console.log(message);
}
// output: Cannot use 'in' operator to search for '1' in 0
// output: TypeError: Cannot use 'in' operator to search for '1' in 0
//
// minify: Cannot use 'in' operator to search for '0' in 0
// minify: TypeError: Cannot use 'in' operator to search for '0' in 0
//
// options: {
// "mangle": false