Move InlineTypeAliases post-typechecking
This is a step closer to removing it completely.
@@ -220,9 +220,6 @@ public final class DefaultPassConfig extends PassConfig {
}
private void addTypeCheckerPasses(List<PassFactory> checks, CompilerOptions options) {
- if (!options.allowsHotswapReplaceScript()) {
- checks.add(inlineTypeAliases);
- }
if (options.checkTypes || options.inferTypes) {
checks.add(resolveTypes);
checks.add(inferTypes);
@@ -396,6 +393,11 @@ public final class DefaultPassConfig extends PassConfig {
addTypeCheckerPasses(checks, options);
+ // TODO(b/124915436): Remove this pass completely after cleaning up the codebase.
+ if (!options.allowsHotswapReplaceScript()) {
+ checks.add(inlineTypeAliases);
+ }
+
// CheckSuspiciousCode requires type information, so must run after the type checker.
if (options.checkSuspiciousCode
|| options.enables(DiagnosticGroups.GLOBAL_THIS)
