summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/private-error-location.js
blob: 7c784c6fb9b1a2f3a444d2421296e35f17b23377 (plain)
1
2
3
4
5
6
7
8
9
10
// Bug 1770609 - Ensure the line number reported is correctly the source of the
//               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);
}