« Bugzilla Issues Index
#1870 — for-of iteration should not ToObject() returned iterator
- bug_id:
1870
- creation_ts:
2013-08-30 12:08:00 -0700
- short_desc:
for-of iteration should not ToObject() returned iterator
- delta_ts:
2013-10-29 09:45:30 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 17: August 23, 2013 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
5281
- comment_count:
0
- who:
André Bargull
- bug_when:
2013-08-30 12:08:35 -0700
11.1.4.2 Array Comprehension
Runtime Semantics: QualifierEvaluation
ComprehensionFor : for (ForBinding of AssignmentExpression )
- step 6
12.6.4.2 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 15.19.4.3.5 GetIterator(obj).
(*) It is unlikely to install a "next" method on primitive wrappers and let primitive wrappers act like an Iterator.
- commentid:
5973
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2013-10-24 15:45:21 -0700
fixed in rev20 editor's draft
- commentid:
6078
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2013-10-29 09:45:30 -0700
fixed in rev20 draft, Oct. 28, 2013