From 9e881407bda32aeca1d383aa4137553c88419354 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 13 Jun 2020 15:24:57 +0100 Subject: fix corner cases related to `AST_Hole` (#3994) --- test/compress/properties.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'test/compress/properties.js') diff --git a/test/compress/properties.js b/test/compress/properties.js index 364eb97e..af57c6b9 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -1046,16 +1046,22 @@ array_hole: { side_effects: true, } input: { - console.log( - [ 1, 2, , 3][1], - [ 1, 2, , 3][2], - [ 1, 2, , 3][3] - ); + Array.prototype[2] = "PASS"; + console.log([ 1, 2, , 3 ][1]); + console.log([ 1, 2, , 3 ][2]); + console.log([ 1, 2, , 3 ][3]); } expect: { - console.log(2, void 0, 3); + Array.prototype[2] = "PASS"; + console.log(2); + console.log([ , , , ][2]); + console.log(3); } - expect_stdout: "2 undefined 3" + expect_stdout: [ + "2", + "PASS", + "3", + ] } new_this: { -- cgit v1.2.3