handle destructuring catch in --reduce-test (#4427)

This commit is contained in:
Alex Lam S.L
2020-12-20 03:22:45 +00:00
committed by GitHub
parent f5224ca1f5
commit caea6aac81
5 changed files with 32 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
try {
"foo" in 42;
} catch ({
message,
}) {
console.log(message);
}

View 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
// }