From a5e6946f74333fc201e76bcba49d0b160edb4448 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 24 Feb 2021 20:41:21 +0000 Subject: fix corner case in `loops` (#4684) fixes #4683 --- test/compress/classes.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/compress/classes.js') diff --git a/test/compress/classes.js b/test/compress/classes.js index 78536094..95b4037d 100644 --- a/test/compress/classes.js +++ b/test/compress/classes.js @@ -596,3 +596,22 @@ issue_4681: { expect_stdout: "function" node_version: ">=12" } + +issue_4683: { + options = { + dead_code: true, + evaluate: true, + loops: true, + } + input: { + "use strict"; + for (class extends null {}; void console.log("PASS"); ); + } + expect: { + "use strict"; + (class extends null {}); + void console.log("PASS"); + } + expect_stdout: "PASS" + node_version: ">=4" +} -- cgit v1.2.3