diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-25 17:40:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-25 17:40:18 +0800 |
commit | 6e86ee950d98ebacef7e02515e34d758c4f836a1 (patch) | |
tree | 405f6bdf24c28f2041e7304aa43347c4a7811f33 /test/compress | |
parent | 8ca2401ebe024287ce1133d2707b1a8ce91f4e6c (diff) | |
download | tracifyjs-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.js | 12 |
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); + } +} |