From 0f4cd73dcc5d8a936ae3630a7992dbcb44274136 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 7 Apr 2017 13:31:58 +0800 Subject: introduce "strict" to `pure_getters` (#1795) --- test/compress/reduce_vars.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'test/compress/reduce_vars.js') diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 842d8de4..b6f711ad 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -1919,7 +1919,7 @@ side_effects_assign: { pure_getters_1: { options = { - pure_getters: true, + pure_getters: "strict", reduce_vars: true, side_effects: true, toplevel: true, @@ -1941,7 +1941,7 @@ pure_getters_1: { pure_getters_2: { options = { - pure_getters: true, + pure_getters: "strict", reduce_vars: true, toplevel: true, unused: true, @@ -1956,6 +1956,21 @@ pure_getters_2: { } } +pure_getters_3: { + options = { + pure_getters: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + var a; + var a = a && a.b; + } + expect: { + } +} + catch_var: { options = { booleans: true, -- cgit v1.2.3