diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-02 20:34:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 03:34:38 +0800 |
commit | a489f8cb5e8fbf2c090df84b47b475375563e8d7 (patch) | |
tree | 214399152a094e73519e146fa9082317c85cb67a | |
parent | e2e4b7fb3779b1719de8562f611c23938ba830b0 (diff) | |
download | tracifyjs-a489f8cb5e8fbf2c090df84b47b475375563e8d7.tar.gz tracifyjs-a489f8cb5e8fbf2c090df84b47b475375563e8d7.zip |
add test case for #3945 (#3948)
-rw-r--r-- | test/compress/hoist_props.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/compress/hoist_props.js b/test/compress/hoist_props.js index 4fcbd796..692dc676 100644 --- a/test/compress/hoist_props.js +++ b/test/compress/hoist_props.js @@ -973,7 +973,7 @@ issue_3871: { expect_stdout: "PASS" } -issue_3945: { +issue_3945_1: { options = { hoist_props: true, reduce_vars: true, @@ -995,3 +995,24 @@ issue_3945: { } } } + +issue_3945_2: { + options = { + hoist_props: true, + reduce_vars: true, + toplevel: true, + } + input: { + console.log(typeof o); + var o = { + p: 0, + }; + } + expect: { + console.log(typeof o); + var o = { + p: 0, + }; + } + expect_stdout: "undefined" +} |