blob: d875dd332cbbb8734578a3872471df826558292d [file] [log] [blame]
let assert = {
throws: (expectedError, functor) => {
try {
functor();
} catch(e) {
if (!(e instanceof expectedError))
throw new Error("Expected to throw: " + expectedError.name + " but throws: " + e.name);
}
}
}
assert.throws(TypeError, () => {
class Base {
[{}.#x] = 1;
#x = "foo";
}
});