From ec095ed647691b3458ec9e65e89ff92d5151abc4 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 1 Jun 2017 04:33:05 +0800 Subject: whitelist `unsafe` `evaluate` candidates (#2039) - all arguments may accept constant values - return constant value - free of side effects - available & identical across locales and runtime environments --- test/compress/evaluate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/compress') diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 020d7cf3..99245d0d 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -780,13 +780,15 @@ unsafe_charAt_noop: { input: { console.log( s.charAt(0), - "string".charAt(x) + "string".charAt(x), + (typeof x).charAt() ); } expect: { console.log( s.charAt(0), - "string".charAt(x) + "string".charAt(x), + (typeof x)[0] ); } } -- cgit v1.2.3