-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
it warns for the following code after upgrading from 19.1.0 to 20.0.0. It uses ReturnIfAbrupt.
Warning: spec.emu: this algorithm is declared as returning an abrupt completion, but there is no step which might plausibly return an abrupt completion
<emu-clause id="sec-iterator-step-cached" type="abstract operation">
<h1>
IteratorStepCached (
_iterator_: an Iterator Record,
_cacheGroup_: a %Map%,
): either a normal completion containing either an ECMAScript language value or ~not-matched~, or an abrupt completion
</h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: _cacheGroup_ is created by CreateMatchCache and used internally for pattern-matching.
1. If _iterator_.[[Done]] is *true*, return ~not-matched~.
1. Let _cache_ be GetMatchCache(_iterator_, _cacheGroup_).
1. Let _iteratedValues_ be ! Get(_cache_, *"IteratedValues"*).
1. Let _iteratorResult_ be Completion(IteratorStep(_iterator_)).
1. If _iteratorResult_ is an abrupt completion, set _iterator_.[[Done]] to *true*.
1. ReturnIfAbrupt(_iteratorResult_).
1. If _iteratorResult_ is *false*, then
1. Set _iterator_.[[Done]] to *true*.
1. Return ~not-matched~.
1. Let _value_ be Completion(IteratorValue(_iteratorResult_)).
1. If _value_ is an abrupt completion, set _iterator_.[[Done]] to *true*.
1. ReturnIfAbrupt(_value_).
1. Perform ! Call(<emu-xref href="#sec-array.prototype.push">%Array.prototype.push%</emu-xref>, _iteratedValues_, « _value_ »).
1. Return _value_.
</emu-alg>
</emu-clause>
Metadata
Metadata
Assignees
Labels
No labels