« Bugzilla Issues Index

#1870 — for-of iteration should not ToObject() returned iterator Array Comprehension
Runtime Semantics: QualifierEvaluation
ComprehensionFor : for (ForBinding of AssignmentExpression )
- step 6 Runtime Semantics
Runtime Semantics: For In/Of Expression Evaluation Abstract Operation
- step 7c

There is little use (*) calling ToObject() on the return value from the @@iterator invocation. I'd suggest replacing these steps with a call to GetIterator(obj).

(*) It is unlikely to install a "next" method on primitive wrappers and let primitive wrappers act like an Iterator.

fixed in rev20 editor's draft

fixed in rev20 draft, Oct. 28, 2013