Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Support generators containing classes #407

@nicolo-ribaudo

Description

@nicolo-ribaudo

Some browsers (e.g. firefox 50) support classes but not generators.
It would be good it regenerator supported untranspiled classes.

REPL


This issue was originally reported by @boris-petrov at babel/babel#12692:

Bug Report

Current behavior

export default async function () {
  return class extends Base {
    foo() {
      return 1;
    }
  };
}

Expected behavior
Code to be transpiled correctly.

Currently Babel blows up with:

unknown Expression of type "ClassExpression"

Using firefox 35 for targets works. As does firefox 53 and above. Similarly to babel/babel#12690.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions