From 6e86ee950d98ebacef7e02515e34d758c4f836a1 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 25 Mar 2017 17:40:18 +0800 Subject: 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 --- test/compress/typeof.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/compress') 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); + } +} -- cgit v1.2.3