Source code
Revision control
Copy as Markdown
Other Tools
// syntax error, not just the first observation of the name.
try {
eval(`class A { #declared; }
m.#declared;`)
} catch (e) {
assertEq(e instanceof SyntaxError, true)
assertEq(e.lineNumber, 2);
}