JS: Don't try to parse "get=" as a method prop

This commit is contained in:
Asger F
2023-04-04 16:35:50 +02:00
parent eb8046daef
commit 621e2e71c8
2 changed files with 516 additions and 35 deletions

View File

@@ -2069,6 +2069,7 @@ public class Parser {
pi.value = this.parseMethod(pi.isGenerator, pi.isAsync);
} else if (this.options.ecmaVersion() >= 5
&& !pi.computed
&& !pi.isPattern
&& pi.key instanceof Identifier
&& (((Identifier) pi.key).getName().equals("get")
|| ((Identifier) pi.key).getName().equals("set"))