mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
* Support synchronous arrays in for-await loops Drive array values through async-from-sync timing, including promise values and early iterator close. Handle defaulted union destructuring into checked-dynamic bindings and refuse void callback parameters before native code generation. Add differential coverage and pinned async Test262 regressions with original-source completion checks. * Fix Error subclass C calls and diagnostics snapshot
13 lines
374 B
JavaScript
13 lines
374 B
JavaScript
async function main() {
|
|
for await (const [value = 10, nullValue = 11, hole = 12, explicit = 13, missing = 14] of [[2, null, , undefined]]) {
|
|
console.log(value, nullValue, hole, explicit, missing);
|
|
}
|
|
|
|
const items = [[3, null, undefined], [4, 5, 6]];
|
|
for (const [first = 8, second = 9, third = 10] of items) {
|
|
console.log(first, second, third);
|
|
}
|
|
}
|
|
|
|
main();
|