Skip to content

Commit 763e063

Browse files
concavelenzcopybara-github
authored andcommitted
Correct pass ordering validation timing.
PiperOrigin-RevId: 611330702
1 parent 1087c0f commit 763e063

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -491,15 +491,16 @@ protected PassListBuilder getChecks() {
491491
// See b/180424427 for why this runs in stage 1 and not stage 2.
492492
checks.maybeAdd(gatherExternPropertiesCheck);
493493

494-
checks.assertAllOneTimePasses();
495-
assertValidOrderForChecks(checks);
496-
497494
checks.maybeAdd(createEmptyPass(PassNames.BEFORE_SERIALIZATION));
498495

499496
if (options.getTypedAstOutputFile() != null) {
500497
checks.maybeAdd(serializeTypedAst);
501498
}
502499

500+
// Validation should be after all pass additions
501+
checks.assertAllOneTimePasses();
502+
assertValidOrderForChecks(checks);
503+
503504
return checks;
504505
}
505506

0 commit comments

Comments
 (0)