fix typeof side effects (#1696)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sun, 26 Mar 2017 20:37:42 +0000 (04:37 +0800)
committerGitHub <noreply@github.com>
Sun, 26 Mar 2017 20:37:42 +0000 (04:37 +0800)
commit581630e0a71cffeadd4887a757889d6a3502275c
tree30f82068f8d462c7cea3959631274e6a39e608c7
parentf5952933a00bac8c9d794d5b0e3d5f8d6173c4a9
fix typeof side effects (#1696)

`statement_to_expression()` drops `typeof` even if it operates on undeclared variables.

Since we now have `drop_side_effect_free()`, replace and remove this deprecated functionality.
lib/compress.js
test/compress/negate-iife.js
test/compress/switch.js