Skip to content

Commit

Permalink
Bugfix: Fix the LexicalEnvironment of the execution context during fu…
Browse files Browse the repository at this point in the history
…nction parameter evaluation

Fallout from tc39#1046. When creating a new environment so that
sloppy direct eval-introduced vars are in a different environment, the
LexicalEnvironment of the execution context was not updated.
  • Loading branch information
syg committed Jan 3, 2020
1 parent cb73c69 commit ac14ce9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8668,6 +8668,8 @@ <h1>FunctionDeclarationInstantiation ( _func_, _argumentsList_ )</h1>
1. Let _calleeEnv_ be the LexicalEnvironment of _calleeContext_.
1. Let _env_ be NewDeclarativeEnvironment(_calleeEnv_).
1. Let _envRec_ be _env_'s EnvironmentRecord.
1. Assert: The VariableEnvironment of _calleeContext_ is _calleeEnv_.
1. Set the LexicalEnvironment of _calleeContext_ to _env_.
1. For each String _paramName_ in _parameterNames_, do
1. Let _alreadyDeclared_ be _envRec_.HasBinding(_paramName_).
1. NOTE: Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters.
Expand Down

0 comments on commit ac14ce9

Please sign in to comment.