diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-02 16:51:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 23:51:06 +0800 |
commit | e2e4b7fb3779b1719de8562f611c23938ba830b0 (patch) | |
tree | 26fb6afbe6a0856f1687309e375c6a33bad0454a /test/compress/hoist_props.js | |
parent | c97ad98f92282bfa52f7d89dd5703021df6bec29 (diff) | |
download | tracifyjs-e2e4b7fb3779b1719de8562f611c23938ba830b0.tar.gz tracifyjs-e2e4b7fb3779b1719de8562f611c23938ba830b0.zip |
fix corner case in `hoist_props` (#3947)
fixes #3945
Diffstat (limited to 'test/compress/hoist_props.js')
-rw-r--r-- | test/compress/hoist_props.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/hoist_props.js b/test/compress/hoist_props.js index a73df1f5..4fcbd796 100644 --- a/test/compress/hoist_props.js +++ b/test/compress/hoist_props.js @@ -972,3 +972,26 @@ issue_3871: { } expect_stdout: "PASS" } + +issue_3945: { + options = { + hoist_props: true, + reduce_vars: true, + } + input: { + function f() { + o.p; + var o = { + q: 0, + }; + } + } + expect: { + function f() { + o.p; + var o = { + q: 0, + }; + } + } +} |