Skip to content

Bug: super method call within async arrow within class method fails #31

Description

@developit

The async-arrows-in-class transform uses Babel's arrowFunctionToExpression() helper, which doesn't patch calls to super methods:

Input:Output:
class A extends B {
  a() {
    (async () => {
      super.b();
    })();
  }
}
class A extends B {
  a() {
    (async function () {
      super.b();  // this is invalid
    })();
  }
}

Here's the bug reproduced in the Babel repl.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions