Skip to content

Commit

Permalink
Normative: Fix extending null
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Oct 9, 2018
1 parent 578dd55 commit d941b5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12540,10 +12540,11 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _newTarget_ be GetNewTarget().
1. Assert: Type(_newTarget_) is Object.
1. Let _func_ be ? GetSuperConstructor().
1. Let _thisER_ be GetThisEnvironment().
1. If _func_ is *null*, Return ? thisER.GetThisBinding().
1. Let _argList_ be ArgumentListEvaluation of |Arguments|.
1. ReturnIfAbrupt(_argList_).
1. Let _result_ be ? Construct(_func_, _argList_, _newTarget_).
1. Let _thisER_ be GetThisEnvironment().
1. Return ? _thisER_.BindThisValue(_result_).
</emu-alg>
</emu-clause>
Expand All @@ -12556,6 +12557,8 @@ <h1>Runtime Semantics: GetSuperConstructor ( )</h1>
1. Assert: _envRec_ is a function Environment Record.
1. Let _activeFunction_ be _envRec_.[[FunctionObject]].
1. Assert: _activeFunction_ is an ECMAScript function object.
1. If _activeFunction_.[[ConstructorKind]] is `"base"`, Return *null*.
1. Assert: _activeFunction_.[[ConstructorKind]] is `"derived"`.
1. Let _superConstructor_ be ! _activeFunction_.[[GetPrototypeOf]]().
1. If IsConstructor(_superConstructor_) is *false*, throw a *TypeError* exception.
1. Return _superConstructor_.
Expand Down Expand Up @@ -19764,7 +19767,7 @@ <h1>Runtime Semantics: ClassDefinitionEvaluation</h1>
1. Let _constructorInfo_ be the result of performing DefineMethod for _constructor_ with arguments _proto_ and _constructorParent_ as the optional _functionPrototype_ argument.
1. Assert: _constructorInfo_ is not an abrupt completion.
1. Let _F_ be _constructorInfo_.[[Closure]].
1. If |ClassHeritage_opt| is present, set _F_.[[ConstructorKind]] to `"derived"`.
1. If |ClassHeritage_opt| is present and _protoParent_ is not *null*, set _F_.[[ConstructorKind]] to `"derived"`.
1. Perform MakeConstructor(_F_, *false*, _proto_).
1. Perform MakeClassConstructor(_F_).
1. Perform CreateMethodProperty(_proto_, `"constructor"`, _F_).
Expand Down

0 comments on commit d941b5c

Please sign in to comment.