Skip to content

Commit 4776a87

Browse files
rishipalcopybara-github
authored andcommitted
Move class rewriting pass post normalize
PiperOrigin-RevId: 623247066
1 parent 2d25f00 commit 4776a87

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/com/google/javascript/jscomp/TranspilationPasses.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ public static void addEarlyOptimizationTranspilationPasses(
206206
if (options.needsTranspilationOf(Feature.ARROW_FUNCTIONS)) {
207207
passes.maybeAdd(es6RewriteArrowFunction);
208208
}
209-
if (options.needsTranspilationOf(Feature.CLASSES)) {
210-
passes.maybeAdd(es6RewriteClass);
211-
}
212209
}
213210

214211
/**
@@ -222,6 +219,10 @@ public static void addPostNormalizationTranspilationPasses(
222219
// TODO(b/197349249): Move passes from `addEarlyOptimizationTranspilationPasses()` to here
223220
// until that method can be deleted as a no-op.
224221

222+
if (options.needsTranspilationOf(Feature.CLASSES)) {
223+
passes.maybeAdd(es6RewriteClass);
224+
}
225+
225226
if (options.needsTranspilationFrom(
226227
FeatureSet.BARE_MINIMUM.with(Feature.REST_PARAMETERS, Feature.SPREAD_EXPRESSIONS))) {
227228
passes.maybeAdd(es6RewriteRestAndSpread);

0 commit comments

Comments
 (0)