Skip to content

Commit

Permalink
Editorial: Add a Return step to ModuleDeclarationEnvironmentSetup (#1266
Browse files Browse the repository at this point in the history
)

When control exits the bottom of the algorithm,
the return value isn't defined.
This wouldn't matter if the operation were invoked
with a simple "Perform", but it's invoked as:
    Perform ? ModuleDeclarationEnvironmentSetup(_module_)
and the '?' (i.e., ReturnIfAbrupt) will examine the return value,
so it should be well-defined.

Any non-abrupt return will do.
  • Loading branch information
jmdyck authored and ljharb committed Sep 6, 2018
1 parent c3a51ab commit f3e73e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -22198,6 +22198,7 @@ <h1>ModuleDeclarationEnvironmentSetup ( _module_ )</h1>
1. If _d_ is a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|, then
1. Let _fo_ be the result of performing InstantiateFunctionObject for _d_ with argument _env_.
1. Call _envRec_.InitializeBinding(_dn_, _fo_).
1. Return NormalCompletion(~empty~).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down

0 comments on commit f3e73e7

Please sign in to comment.