facebook/regenerator

Support generators containing classes

nicolo-ribaudo opened this issue · 0 comments

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.