fix corner case in properties (#4830)

fixes #4829
This commit is contained in:
Alex Lam S.L
2021-04-01 00:05:50 +01:00
committed by GitHub
parent 6335b5fd8a
commit 1947a21824
2 changed files with 32 additions and 8 deletions

View File

@@ -1344,3 +1344,27 @@ issue_4821_2: {
expect_stdout: "function"
node_version: ">=12"
}
issue_4829: {
options = {
properties: true,
}
input: {
"use strict";
try {
class A extends { f(){} }.f {}
} catch (e) {
console.log("PASS");
}
}
expect: {
"use strict";
try {
class A extends [ () => {} ][0] {}
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
node_version: ">=4"
}