-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Input code
new (class Foo extends class { } {
constructor() {
let x = 1;
(async () => {
console.log("before super", x); // (1) Sync phase
await 1;
console.log("after super", x); // (2) Async phase
})();
super();
x = 2;
}
})();
Esbuild playground
Expected Behavior
The code should output:
before super 1
after super 2
Actual Behavior
Throws a reference error:
Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
hyrious
Metadata
Metadata
Assignees
Labels
No labels