Fix duplicated private identifier lookup (#4947)

This patch fixes #4921.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2022-01-18 13:22:45 +01:00
committed by GitHub
parent 85c798705a
commit 79fd540ec9
2 changed files with 24 additions and 12 deletions
+7
View File
@@ -47,6 +47,13 @@ check_syntax_error("class A { static get #a(){}; set #a(){}; #a; }");
check_syntax_error("class A { static #a(){}; #a; }");
check_syntax_error("class A extends B{ foo(){ super.#a }}");
check_syntax_error("class A extends function() { x = this.#foo; }{ #foo; };");
check_syntax_error("class A { static async *#bar(x) { } #bar }");
check_syntax_error("class A { static async #bar(x) { } #bar }");
check_syntax_error("class A { static *#bar(x) { } #bar }");
check_syntax_error("class A { async *#bar(x) { } #bar }");
check_syntax_error("class A { async #bar(x) { } #bar }");
check_syntax_error("class A { *#bar(x) { } #bar }");
class A {
#a = 1;