Skip to content
New issue

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

Invalid syntax when compiling optional chaining with class super keyword #362

Closed
LarsDenBakker opened this issue Sep 2, 2020 · 0 comments

Comments

@LarsDenBakker
Copy link

When compiling optional chaining, patterns like this:

class Foo { 
  bar() { 
    super.bar?.(); 
  } 
}

It gets compiled to:

class Foo {
    bar() {
      var _a, _b;
      (_b = (_a = super).bar) == null ? void 0 : _b.call(_a);
    }
}

This is invalid javascript, in Chrome I get: Uncaught SyntaxError: 'super' keyword unexpected here.

See https://repl.it/repls/RawHandyFormats for a reproduction.

@evanw evanw closed this as completed in df3c540 Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant