Packages

QuickJS JavaScript engine for Erlang (powered by quickjs-ng)

Current section

Files

Jump to
quickjs c_src quickjs-ng tests bug493.js
Raw

c_src/quickjs-ng/tests/bug493.js

// Iterator.prototype.map must not leak the original item
function* gen() {
for (let i = 0; i < 5; i++) {
yield { index: i };
}
}
const mapped = gen().map(x => x.index * 2);
for (const val of mapped) {}