SuperCall : super Arguments
1. Let newTarget be GetNewTarget().
2. Assert: Type(newTarget) is Object.
3. Let func be ? GetSuperConstructor().
4. Let argList be ? ArgumentListEvaluation of Arguments.
5. Let result be ? Construct(func, argList, newTarget).
6. Let thisER be GetThisEnvironment().
7. Return ? thisER.BindThisValue(result).
SuperCall : super Arguments
1. Let newTarget be GetNewTarget().
2. Assert: Type(newTarget) is Object.
3. Let func be GetSuperConstructor().
4. Let argList be ? ArgumentListEvaluation of Arguments.
5. ReturnIfAbrupt(func).
6. Let result be ? Construct(func, argList, newTarget).
7. Let thisER be GetThisEnvironment().
8. Return ? thisER.BindThisValue(result).
SuperCall : super Arguments
1. Let newTarget be GetNewTarget().
2. Assert: Type(newTarget) is Object.
3. Let argList be ? ArgumentListEvaluation of Arguments.
4. Let func be ? GetSuperConstructor().
5. Let result be ? Construct(func, argList, newTarget).
6. Let thisER be GetThisEnvironment().
7. Return ? thisER.BindThisValue(result).
Code wise:
var x = 0;
class C extends null {
constructor() {
super(x = 1);
}
}
try {
new C;
} catch {}
x === 1; // Current: false
// proposed + suggestion: true
Also:
var x = 0;
class C extends Object {
constructor() {
super(x = 1);
}
}
Object.setPrototypeOf(C, parseInt);
try {
new C;
} catch {}
x === 1; // Current: false
// proposed + suggestion: true
Suggested effects:
var x = 0;
var getproto = false;
class C extends null {
constructor() {
super(x = 1);
}
}
var P = new Proxy(C, {
getPrototypeOf() {
getproto = true;
return null;
}
});
try {
new P;
} catch {}
x === 1; // Current spec: false (x === 0)
// proposed + suggestion: true
getproto; // Current: true
// proposed in the PR: getproto is true
// w/ suggested spec: getproto is false