Issue #2142 - Implement syntax for public/private fields and computed field names

This state still has the initializers scoped on .initializers local variable, which will be changed later.

Based-on: m-c 1499448, 1530084, 1530832, 1529448 (partial), 1532921, 1528039, 1528038, 1535166, 1550628,
              1535166, 1550628, 1541641, 1547133, 1540787, 1535804/9
This commit is contained in:
Martok 2023-04-06 03:10:50 +02:00 committed by roytam1
commit 51db22ff2f
24 changed files with 1383 additions and 290 deletions

View file

@ -4430,7 +4430,7 @@ JS::CompileFunction(JSContext* cx, AutoObjectVector& envChain,
return false;
// If name is not valid identifier
if (!js::frontend::IsIdentifier(name, nameLen))
if (!js::frontend::IsIdentifier(reinterpret_cast<const Latin1Char*>(name), nameLen))
isInvalidName = true;
}