We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
this
super()
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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; } })();
https://esbuild.github.io/try/#dAAwLjI1LjIALS10YXJnZXQ9ZXMyMDE2AG5ldyAoY2xhc3MgRm9vIGV4dGVuZHMgY2xhc3MgeyB9IHsKCWNvbnN0cnVjdG9yKCkgewoJCWxldCB4ID0gMTsKCQkoYXN5bmMgKCkgPT4gewoJCQljb25zb2xlLmxvZygiYmVmb3JlIHN1cGVyIiwgeCk7CgkJCWF3YWl0IDE7CgkJCWNvbnNvbGUubG9nKCJhZnRlciBzdXBlciIsIHgpOwoJCX0pKCk7CgkJc3VwZXIoKTsKCQl4ID0gMjsKCX0KfSkoKTsK
The code should output:
before super 1 after super 2
Throws a reference error:
Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
The text was updated successfully, but these errors were encountered:
fix evanw#4141: Avoid redundant this access during async function l…
71f5fbd
…owering
7ed1684
Successfully merging a pull request may close this issue.
Input code
Esbuild playground
https://esbuild.github.io/try/#dAAwLjI1LjIALS10YXJnZXQ9ZXMyMDE2AG5ldyAoY2xhc3MgRm9vIGV4dGVuZHMgY2xhc3MgeyB9IHsKCWNvbnN0cnVjdG9yKCkgewoJCWxldCB4ID0gMTsKCQkoYXN5bmMgKCkgPT4gewoJCQljb25zb2xlLmxvZygiYmVmb3JlIHN1cGVyIiwgeCk7CgkJCWF3YWl0IDE7CgkJCWNvbnNvbGUubG9nKCJhZnRlciBzdXBlciIsIHgpOwoJCX0pKCk7CgkJc3VwZXIoKTsKCQl4ID0gMjsKCX0KfSkoKTsK
Expected Behavior
The code should output:
Actual Behavior
Throws a reference error:
The text was updated successfully, but these errors were encountered: