diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-06-24 20:43:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 03:43:52 +0800 |
commit | 7621527a5f6a2bef8be44714729a082d4691d2d5 (patch) | |
tree | 9b438fcefb8d84f250853618a137a8cd722d3fdf /test | |
parent | 1a064b6e741f9c3e98f4e2de8084c48f324c0318 (diff) | |
download | tracifyjs-7621527a5f6a2bef8be44714729a082d4691d2d5.tar.gz tracifyjs-7621527a5f6a2bef8be44714729a082d4691d2d5.zip |
fix corner case in `functions` (#5037)
fixes #5036
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index b3a6011f..e4766cd5 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -6258,3 +6258,28 @@ issue_5025: { } expect_stdout: "object" } + +issue_5036: { + options = { + functions: true, + reduce_vars: true, + unused: true, + } + input: { + console.log(typeof function() { + var await = function f() { + return f; + }; + return await() === await; + }() ? "PASS" : "FAIL"); + } + expect: { + console.log(typeof function() { + function await() { + return await; + } + return await() === await; + }() ? "PASS" : "FAIL"); + } + expect_stdout: "PASS" +} |