Move arrow function transpilation after the checks phase
@@ -105,7 +105,7 @@ public class TranspilationPasses {
passes.add(es6SplitVariableDeclarations);
passes.add(
getEs6RewriteDestructuring(ObjectDestructuringRewriteMode.REWRITE_ALL_OBJECT_PATTERNS));
- passes.add(es6RewriteArrowFunction);
+
// TODO(bradfordcsmith): Inject runtime libraries now includes async generator support
// (ES_2018), so this should be moved earlier and possibly run unconditionally by this
// method, since it will itself detect what it needs to inject or doesn't need to inject.
@@ -153,6 +153,7 @@ public class TranspilationPasses {
Feature.REGEXP_FLAG_U,
Feature.REGEXP_FLAG_Y));
+ passes.add(es6RewriteArrowFunction);
passes.add(es6ExtractClasses);
passes.add(es6RewriteClass);
passes.add(es6RewriteRestAndSpread);
