From 3dd495ecdd231a6b245ab002f61805b21114924b Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 7 Dec 2017 01:01:52 +0800 Subject: improve `if_return` (#2558) `return void x()` => `x()` --- test/compress/return_undefined.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test') diff --git a/test/compress/return_undefined.js b/test/compress/return_undefined.js index 9662aa51..4d2b4257 100644 --- a/test/compress/return_undefined.js +++ b/test/compress/return_undefined.js @@ -122,3 +122,25 @@ return_undefined: { } } } + +return_void: { + options = { + if_return: true, + inline: true, + reduce_vars: true, + unused: true, + } + input: { + function f() { + function g() { + h(); + } + return g(); + } + } + expect: { + function f() { + h(); + } + } +} -- cgit v1.2.3