Skip to content

Commit d2de0c6

Browse files
authored
Wrap bare return values with Completion Records in abstract closure (#32)
1 parent 15ceae3 commit d2de0c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h1><ins>Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] )</ins></h
141141
1. Let _next_ be ? Await(IteratorStep(_iteratorRecord_)).
142142
1. If _next_ is *false*, then
143143
1. Perform ? Set(_A_, *"length"*, 𝔽(_k_), *true*).
144-
1. Return _A_.
144+
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _A_, [[Target]]: ~empty~ }.
145145
1. Let _nextValue_ be ? IteratorValue(_next_).
146146
1. If _mapping_ is *true*, then
147147
1. Let _mappedValue_ be Call(_mapfn_, _thisArg_, &laquo; _nextValue_, 𝔽(_k_) &raquo;).
@@ -172,7 +172,7 @@ <h1><ins>Array.fromAsync ( _asyncItems_ [ , _mapfn_ [ , _thisArg_ ] ] )</ins></h
172172
1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_).
173173
1. Set _k_ to _k_ + 1.
174174
1. Perform ? Set(_A_, *"length"*, 𝔽(_len_), *true*).
175-
1. Return _A_.
175+
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _A_, [[Target]]: ~empty~ }.
176176
1. Perform AsyncFunctionStart(_promiseCapability_, _fromAsyncClosure_).
177177
1. Return _promiseCapability_.[[Promise]].
178178
</emu-alg>

0 commit comments

Comments
 (0)