import { assert } from "./assert.js";
let frames;
Error.prepareStackTrace = (_, f) => { frames = f; return f; };
function Thing() { void new Error(""); }
new Thing();
function plain() { void new Error(""); }
plain();
Error.prepareStackTrace = undefined;
assert(frames[0].getFunctionName(), "plain");
assert(!frames[0].isConstructor());
Error.prepareStackTrace = (_, f) => { frames = f; return f; };
new Thing();
Error.prepareStackTrace = undefined;
assert(frames[0].getFunctionName(), "Thing");
assert(frames[0].isConstructor());
assert(!frames[1].isConstructor());