handle destructuring catch in --reduce-test (#4427)
This commit is contained in:
7
test/input/reduce/destructured_catch.js
Normal file
7
test/input/reduce/destructured_catch.js
Normal file
@@ -0,0 +1,7 @@
|
||||
try {
|
||||
"foo" in 42;
|
||||
} catch ({
|
||||
message,
|
||||
}) {
|
||||
console.log(message);
|
||||
}
|
||||
15
test/input/reduce/destructured_catch.reduced.js
Normal file
15
test/input/reduce/destructured_catch.reduced.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// (beautified)
|
||||
try {
|
||||
1 in 0;
|
||||
} catch ({
|
||||
message: message
|
||||
}) {
|
||||
console.log(message);
|
||||
}
|
||||
// output: Cannot use 'in' operator to search for '1' in 0
|
||||
//
|
||||
// minify: Cannot use 'in' operator to search for '0' in 0
|
||||
//
|
||||
// options: {
|
||||
// "mangle": false
|
||||
// }
|
||||
Reference in New Issue
Block a user