aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-25 17:40:18 +0800
committerGitHub <noreply@github.com>2017-03-25 17:40:18 +0800
commit6e86ee950d98ebacef7e02515e34d758c4f836a1 (patch)
tree405f6bdf24c28f2041e7304aa43347c4a7811f33 /test/compress
parent8ca2401ebe024287ce1133d2707b1a8ce91f4e6c (diff)
downloadtracifyjs-6e86ee950d98ebacef7e02515e34d758c4f836a1.tar.gz
tracifyjs-6e86ee950d98ebacef7e02515e34d758c4f836a1.zip
fix typeof side-effects (#1669)
`has_side_effects()` does not take `typeof`'s magical power of not tripping over undeclared variable into account. fixes #1668
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/typeof.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/compress/typeof.js b/test/compress/typeof.js
index 7bf8e5e3..60f3d1d0 100644
--- a/test/compress/typeof.js
+++ b/test/compress/typeof.js
@@ -48,3 +48,15 @@ typeof_in_boolean_context: {
foo();
}
}
+
+issue_1668: {
+ options = {
+ booleans: true,
+ }
+ input: {
+ if (typeof bar);
+ }
+ expect: {
+ if (!0);
+ }
+}
869c5ceaa450184fd59722ef3e369922bced528'>gnu: Add groovy-ant....* gnu/packages/groovy.scm (groovy-ant): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-groovydoc....* gnu/packages/groovy.scm (groovy-groovydoc): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-templates....* gnu/packages/groovy.scm (groovy-templates): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-xml....* gnu/packages/groovy.scm (groovy-xml): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-test....* gnu/packages/groovy.scm (groovy-test): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-tests-bootstrap....* gnu/packages/groovy.scm (groovy-tests-bootstrap): New variable. Julien Lepiller 2018-05-09gnu: Add groovy-bootstrap....* gnu/packages/groovy.scm (groovy-bootstrap): New variable. Julien Lepiller 2018-05-09gnu: Add java-groovy-bootstrap....* gnu/packages/groovy.scm: New file. * gnu/packages/patches/groovy-add-exceptionutilsgenerator.patch: New file. * gnu/local.mk (GNU_SYSTEM_MODULES, dist_patch_DATA): Add them. Julien Lepiller