diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-20 02:31:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 10:31:32 +0800 |
commit | f5224ca1f5075d6912616675f1aa7fa8cc7741f1 (patch) | |
tree | 26b0bad890f3aea870631608c708bf9269dc8265 /test | |
parent | b7c49b72b3abd5da869d882a4e122cb155382874 (diff) | |
download | tracifyjs-f5224ca1f5075d6912616675f1aa7fa8cc7741f1.tar.gz tracifyjs-f5224ca1f5075d6912616675f1aa7fa8cc7741f1.zip |
fix corner case with destructuring `catch` (#4426)
fixes #4425
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/destructured.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 06c9fddb..d36bbf33 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -2001,3 +2001,39 @@ issue_4420: { expect_stdout: "PASS" node_version: ">=8" } + +issue_4425: { + rename = true + input: { + var a; + console.log(function() { + try { + try { + throw 42; + } catch ({ + [a]: a, + }) {} + return "FAIL"; + } catch (e) { + return "PASS"; + } + }()); + } + expect: { + var a; + console.log(function() { + try { + try { + throw 42; + } catch ({ + [b]: b, + }) {} + return "FAIL"; + } catch (c) { + return "PASS"; + } + }()); + } + expect_stdout: "PASS" + node_version: ">=8" +} |