Move transpilation just before normalization
This fixes a false positive compiler error on defining a goog.getMsg inside an async function or generator.
@@ -517,8 +517,6 @@ public final class DefaultPassConfig extends PassConfig {
passes.add(typesToColors);
- TranspilationPasses.addEarlyOptimizationTranspilationPasses(passes, options);
-
if (options.closurePass) {
passes.add(closureProvidesRequires);
}
@@ -547,6 +545,8 @@ public final class DefaultPassConfig extends PassConfig {
// Defines in code always need to be processed.
passes.add(processDefinesOptimize);
+ TranspilationPasses.addEarlyOptimizationTranspilationPasses(passes, options);
+
passes.add(normalize);
passes.add(gatherGettersAndSetters);
