Move J2CL source file check after type checking.
For reasons unknown it was inserted to run after NTI (if enabled)
but before OTI (if enabled).
This is done in preparation for adding passes to occur after
type checking (either type) but before the remaining checks.
@@ -490,14 +490,14 @@ public final class DefaultPassConfig extends PassConfig {
addNewTypeCheckerPasses(checks, options);
}
- if (options.j2clPassMode.shouldAddJ2clPasses()) {
- checks.add(j2clSourceFileChecker);
- }
-
if (!options.getNewTypeInference()) {
addOldTypeCheckerPasses(checks, options);
}
+ if (options.j2clPassMode.shouldAddJ2clPasses()) {
+ checks.add(j2clSourceFileChecker);
+ }
+
if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE)
|| (!options.getNewTypeInference() && !options.disables(DiagnosticGroups.MISSING_RETURN))) {
checks.add(checkControlFlow);
