Skip to content

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

Open
@developit

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.

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