Add regression test for previous commit

This commit is contained in:
Ben Noordhuis 2023-12-10 19:20:15 +01:00
parent 30e4767e67
commit 67d90092fe

View file

@ -372,6 +372,20 @@ function test_eval2()
f1(g); f1(g);
f2(g); f2(g);
assert(g_call_count, 2); assert(g_call_count, 2);
var e;
try {
new class extends Object {
constructor() {
(() => {
for (const _ in this);
eval("");
})();
}
};
} catch (_e) {
e = _e;
}
assert(e?.message, "this is not initialized");
} }
function test_eval() function test_eval()