Skip to content

Commit

Permalink
close iterator (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored Feb 26, 2024
1 parent eaf9f69 commit ef61b90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ <h1>Math.sumExact ( _items_ )</h1>
1. Set _next_ to ? IteratorStepValue(_iteratorRecord_).
1. If _next_ is not ~done~, then
1. Set _count_ to _count_ + 1.
1. If _count_ ≥ 2<sup>53</sup>, throw a *RangeError* exception.
1. If _count_ ≥ 2<sup>53</sup>, then
1. Let _error_ be ThrowCompletion(a newly created *RangeError* object).
1. Return ? IteratorClose(_iteratorRecord_, _error_).
1. NOTE: The above case is not expected to be reached in practice and is included only so that implementations may rely on inputs being "reasonably sized" without violating this specification.
1. If _next_ is not a number, throw a *TypeError* exception.
1. If _next_ is not a number, then
1. Let _error_ be ThrowCompletion(a newly created *TypeError* object).
1. Return ? IteratorClose(_iteratorRecord_, _error_).
1. Let _n_ be _next_.
1. If _state_ is not ~not-a-number~, then
1. If _n_ is *NaN*, set _state_ to ~not-a-number~.
Expand Down

0 comments on commit ef61b90

Please sign in to comment.