Missing tests for `next` caching in array-destructuring?
gibson042 opened this issue · comments
Richard Gibson commented
Statements like const [] = iterable
and const [x, y] = iterable
should get an iterator from iterable
and cache its next
method, resulting in exactly one observable read thereof. But we may be missing coverage for this, as evidenced by Moddable-OpenSource/moddable#1223 (unless the coverage is present and I've just missed it).
Related: tc39/ecma262#1021
Kevin Gibbons commented
See also #1362