summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/bug1706923.js
blob: 0d0c855efe740addd0e5543467a328e1e73f6868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var error = undefined;
try {
    eval(`class a {
        static #x() { }
        [b.#x]
        }`);
} catch (e) {
    error = e;
}

assertEq(error instanceof ReferenceError, true);

var error = undefined;
try {
    eval(`class Base {};

    class B extends Base {
        static #x() { }
        [Base.#x] = 1;
        constructor() {
            super();
        }
    }`);
} catch (e) {
    error = e;
}

assertEq(error instanceof TypeError, true);