Debian Codegraph @

js/src/jit-test/tests/parser/bug-1263355-51.js

raw
1 // TDZ checks work in destructuring default expressions,
2 // even after the variables are initialized the first time.
3
4 load(libdir + "asserts.js");
5
6 assertThrowsInstanceOf(() => {
7 // should throw the second time through: b is uninitialized
8 for (const {a=b, b} of [{a:1, b:2}, {b:3}]) {}
9 }, ReferenceError);