diff options
Diffstat (limited to 'test/compress/conditionals.js')
-rw-r--r-- | test/compress/conditionals.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index 64088eb2..4187c152 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -1861,3 +1861,39 @@ issue_3808_2: { } expect_stdout: " PASS" } + +object_super: { + options = { + conditionals: true, + } + input: { + Object.setPrototypeOf({ + f(a) { + a ? this.g("FAIL") : super.g("FAIL"); + }, + g(b) { + console.log(b); + }, + }, { + g() { + console.log("PASS"); + }, + }).f(); + } + expect: { + Object.setPrototypeOf({ + f(a) { + a ? this.g("FAIL") : super.g("FAIL"); + }, + g(b) { + console.log(b); + }, + }, { + g() { + console.log("PASS"); + }, + }).f(); + } + expect_stdout: "PASS" + node_version: ">=4" +} |