From f3e73e7225827cade38adb81c85b8c1795874a25 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Tue, 14 Aug 2018 22:22:49 -0400 Subject: [PATCH] Editorial: Add a Return step to ModuleDeclarationEnvironmentSetup (#1266) 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. --- spec.html | 1 + 1 file changed, 1 insertion(+) diff --git a/spec.html b/spec.html index 155db30459..90475c7b0c 100644 --- a/spec.html +++ b/spec.html @@ -22198,6 +22198,7 @@

ModuleDeclarationEnvironmentSetup ( _module_ )

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~).