public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2e4b7f
)
add test case for #3945 (#3948)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Tue, 2 Jun 2020 19:34:38 +0000
(20:34 +0100)
committer
GitHub
<noreply@github.com>
Tue, 2 Jun 2020 19:34:38 +0000
(
03:34
+0800)
test/compress/hoist_props.js
patch
|
blob
|
history
diff --git
a/test/compress/hoist_props.js
b/test/compress/hoist_props.js
index
4fcbd79
..
692dc67
100644
(file)
--- 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"
+}