| binding.js |
---
es6id: 14.5
description: >
class subclass binding
--- |
1420 |
- |
| bound-function.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
es6id: 14.5.14
description: SuperClass may be a bound function object
info: |
[...]
5. If ClassHeritageopt is not present, then
[...]
6. Else,
[...]
e. If superclass is null, then
[...]
f. Else if IsConstructor(superclass) is false, throw a TypeError exception.
g. Else,
i. Let protoParent be ? Get(superclass, "prototype").
ii. If Type(protoParent) is neither Object nor Null, throw a TypeError
exception.
iii. Let constructorParent be superclass.
[...]
--- |
886 |
- |
| builtin-objects |
|
|
- |
| builtins.js |
---
es6id: 14.5
description: >
class sublclassing builtins
--- |
970 |
- |
| class-definition-evaluation-empty-constructor-heritage-present.js |
---
es6id: 14.5.14
description: >
10. If constructor is empty, then,
a. If ClassHeritageopt is present, then
i. Let constructor be the result of parsing the String "constructor(... args){ super (...args);}" using the syntactic grammar with the goal symbol MethodDefinition.
--- |
761 |
- |
| class-definition-null-proto-contains-return-override.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
es6id: 14.5.14
description: >
The constructor of a null-extending class can contain an explicit return value.
info: |
Runtime Semantics: ClassDefinitionEvaluation
[...]
15. If ClassHeritageopt is present, then set F's [[ConstructorKind]] internal slot to "derived".
[...]
9.2.2 [[Construct]]
[...]
13. If result.[[Type]] is return, then
a. If Type(result.[[Value]]) is Object, return NormalCompletion(result.[[Value]]).
[...]
--- |
847 |
- |
| class-definition-null-proto-missing-return-override.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
The `this` value of a null-extending class isn't automatically initialized,
which makes it necessary to have an explicit return value in the constructor.
info: |
Runtime Semantics: ClassDefinitionEvaluation
[...]
5. If ClassHeritageopt is not present, then
[...]
6. Else,
[...]
b. Let superclass be the result of evaluating ClassHeritage.
[...]
15. If ClassHeritageopt is present, then set F's [[ConstructorKind]] internal slot to "derived".
[...]
9.2.2 [[Construct]]
[...]
15. Return ? envRec.GetThisBinding().
8.1.1.3.4 GetThisBinding ( )
[...]
3. If envRec.[[ThisBindingStatus]] is "uninitialized", throw a ReferenceError exception.
[...]
--- |
1021 |
- |
| class-definition-null-proto-super.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
Attempting to call `super()` in a null-extending class throws a TypeError,
because %FunctionPrototype% cannot be called as constructor function.
info: |
Runtime Semantics: ClassDefinitionEvaluation
[...]
5. If ClassHeritageopt is not present, then
[...]
6. Else,
[...]
b. Let superclass be the result of evaluating ClassHeritage.
[...]
e. If superclass is null, then
[...]
ii. Let constructorParent be the intrinsic object %FunctionPrototype%.
[...]
15. Let constructorInfo be the result of performing DefineMethod for constructor with arguments proto and constructorParent as the optional functionPrototype argument.
[...]
12.3.5.1 Runtime Semantics: Evaluation
SuperCall : super Arguments
[...]
3. Let func be ? GetSuperConstructor().
4. Let argList be ArgumentListEvaluation of Arguments.
[...]
12.3.5.2 Runtime Semantics: GetSuperConstructor ( )
[...]
5. Let superConstructor be ! activeFunction.[[GetPrototypeOf]]().
6. If IsConstructor(superConstructor) is false, throw a TypeError exception.
[...]
--- |
1592 |
- |
| class-definition-null-proto-this.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
The `this` value of a null-extending class isn't automatically initialized
info: |
Runtime Semantics: ClassDefinitionEvaluation
[...]
15. If ClassHeritageopt is present, then set F's [[ConstructorKind]] internal slot to "derived".
[...]
12.2.2.1 Runtime Semantics: Evaluation
PrimaryExpression : this
1. Return ? ResolveThisBinding( ).
8.3.4 ResolveThisBinding ( )
[...]
2. Return ? envRec.GetThisBinding().
8.1.1.3.4 GetThisBinding ( )
[...]
3. If envRec.[[ThisBindingStatus]] is "uninitialized", throw a ReferenceError exception.
[...]
--- |
1046 |
- |
| class-definition-null-proto.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
es6id: 14.5.14
description: >
The prototype of a null-extending class is %FunctionPrototype%, the prototype of
its "prototype" property is `null`.
info: |
Runtime Semantics: ClassDefinitionEvaluation
[...]
5. If ClassHeritageopt is not present, then
[...]
6. Else,
[...]
b. Let superclass be the result of evaluating ClassHeritage.
[...]
e. If superclass is null, then
i. Let protoParent be null.
ii. Let constructorParent be the intrinsic object %FunctionPrototype%.
[...]
--- |
963 |
- |
| class-definition-parent-proto-null.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
description: A class which extends a constructor with null .prototype is a derived class.
--- |
570 |
- |
| class-definition-superclass-generator.js |
---
es6id: 14.5.14_S6.g.i
description: >
Runtime Semantics: ClassDefinitionEvaluation
If superclass has a [[FunctionKind]] internal slot whose value is "generator", throw a TypeError exception.
features: [generators]
--- |
500 |
- |
| default-constructor-2.js |
---
es6id: 14.5
description: >
class default constructor 2
--- |
1565 |
- |
| default-constructor-spread-override.js |
---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
Default class constructor uses standard iterator spread semantics.
info: |
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
...
10. If constructor is empty, then
a. If ClassHeritageopt is present, then
i Let constructor be the result of parsing the source text
constructor(...args){ super(...args); }
using the syntactic grammar with the goal symbol MethodDefinition.
...
14.1.19 Runtime Semantics: IteratorBindingInitialization
`FunctionRestParameter : BindingRestElement`
...
9. Let result be the result of performing IteratorBindingInitialization for BindingRestElement using iteratorRecord and environment as the arguments.
...
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
`BindingRestElement : ...BindingIdentifier`
...
2. Let A be ArrayCreate(0).
...
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
`ArgumentList : ArgumentList , ...AssignmentExpression`
...
3. Let iterator be ? GetIterator(? GetValue(spreadRef)).
...
features: [Symbol.iterator]
--- |
1731 |
- |
| default-constructor.js |
---
es6id: 14.5
description: >
class default constructor
--- |
513 |
- |
| derived-class-return-override-with-boolean.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, throw a TypeError exception.
...
`return true;`
--- |
569 |
- |
| derived-class-return-override-with-empty.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, ...
14. Else, ReturnIfAbrupt(result).
15. Return envRec.GetThisBinding().
`return (empty);` Should be the same as `return undefined;`
--- |
930 |
- |
| derived-class-return-override-with-null.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, throw a TypeError exception.
...
`return null;`
--- |
569 |
- |
| derived-class-return-override-with-number.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, throw a TypeError exception.
...
`return 0;`
--- |
563 |
- |
| derived-class-return-override-with-object.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
a. If Type(result.[[value]]) is Object, return NormalCompletion(result.[[value]]).
...
...
`return {};`
--- |
886 |
- |
| derived-class-return-override-with-string.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, throw a TypeError exception.
...
`return "";`
--- |
565 |
- |
| derived-class-return-override-with-symbol.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, throw a TypeError exception.
...
`return Symbol();`
features: [Symbol]
--- |
596 |
- |
| derived-class-return-override-with-this.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
b. If kind is "base", return NormalCompletion(thisArgument).
...
...
`return this;`
--- |
854 |
- |
| derived-class-return-override-with-undefined.js |
---
es6id: 9.2.2
description: >
[[Construct]] ( argumentsList, newTarget)
...
13. If result.[[type]] is return, then
...
c. If result.[[value]] is not undefined, ...
14. Else, ReturnIfAbrupt(result).
15. Return envRec.GetThisBinding().
`return undefined;`
--- |
901 |
- |
| superclass-prototype-setter-constructor.js |
---
es6id: 14.5
description: >
superclass setter "constructor" override
--- |
386 |
- |
| superclass-prototype-setter-method-override.js |
---
es6id: 14.5
description: >
superclass prototype override
--- |
436 |
- |
| superclass-static-method-override.js |
---
es6id: 14.5
description: >
Static method override
--- |
467 |
- |