DescriptionSupport rest element pattern with user-defined iterable
The original implementation incorrectly supplied an iterator (not an
iterable) to a `for-of` statement. This functioned as expected for
built-in iterators because (by inheriting the InteratorPrototype
intrinsic's `Symbol.iterator` method) they are technically iterables as
well. This is not part of the formal Iterator interface requirements,
however, and user-created iterators that did not define a
`Symbol.iterator` property would produce an error when used as the
value for an AssignmentRestElement or BindingRestElement.
Update the internals to interpret the value as an iterator.
BUG=v8:4759
LOG=N
R=adamk@chromium.org
Patch Set 1 #
Messages
Total messages: 9 (1 generated)
|