Skip to content

Commit 67d9009

Browse files
committed
Add regression test for previous commit
1 parent 30e4767 commit 67d9009

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_builtin.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,20 @@ function test_eval2()
372372
f1(g);
373373
f2(g);
374374
assert(g_call_count, 2);
375+
var e;
376+
try {
377+
new class extends Object {
378+
constructor() {
379+
(() => {
380+
for (const _ in this);
381+
eval("");
382+
})();
383+
}
384+
};
385+
} catch (_e) {
386+
e = _e;
387+
}
388+
assert(e?.message, "this is not initialized");
375389
}
376390

377391
function test_eval()

0 commit comments

Comments
 (0)