Skip to content

Commit

Permalink
Editorial: install private fields in default base constructor (#2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek authored and ljharb committed Oct 21, 2021
1 parent a714cfd commit c43b126
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -24776,10 +24776,12 @@ <h1>
1. NOTE: This branch behaves similarly to `constructor(...args) { super(...args); }`. The most notable distinction is that while the aforementioned ECMAScript source text observably calls the @@iterator method on `%Array.prototype%`, this function does not.
1. Let _func_ be ! _F_.[[GetPrototypeOf]]().
1. If IsConstructor(_func_) is *false*, throw a *TypeError* exception.
1. Return ? Construct(_func_, _args_, NewTarget).
1. Let _result_ be ? Construct(_func_, _args_, NewTarget).
1. Else,
1. NOTE: This branch behaves similarly to `constructor() {}`.
1. Return ? OrdinaryCreateFromConstructor(NewTarget, *"%Object.prototype%"*).
1. Let _result_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Object.prototype%"*).
1. Perform ? InitializeInstanceElements(_result_, _F_).
1. Return _result_.
1. Let _F_ be ! CreateBuiltinFunction(_defaultConstructor_, 0, _className_, &laquo; [[ConstructorKind]], [[SourceText]] &raquo;, the current Realm Record, _constructorParent_).
1. Else,
1. Let _constructorInfo_ be ! DefineMethod of _constructor_ with arguments _proto_ and _constructorParent_.
Expand Down

0 comments on commit c43b126

Please sign in to comment.