blob: b18429e3c93d731e649a435717627afa326b4351 [file] [log] [blame]
function assert(a, e, m) {
if (a !== e)
throw new Error(m);
}
function assertSyntaxError(code) {
try {
eval(code);
throw new Error("Code executed without throwing SyntaxError");
} catch (e) {
assert(e instanceof SyntaxError, true, e.message);
}
}
assertSyntaxError(`
class C {
static get #m() {}
set #m(v) {}
}
`);
assertSyntaxError(`
class C {
get #m() {}
static set #m(v) {}
}
`);
assertSyntaxError(`
class C {
static set #m(v) {}
get #m() {}
}
`);
assertSyntaxError(`
class C {
set #m(v) {}
static get #m() {}
}
`);