ClosureProvidesRequires pass should be run if closurePass option is enabled
Currently, options.closurePass is checked before adding ClosureProvidesRequires before
typechecking. But it is not checked when adding ClosureProvidesRequires after
type checking.
@@ -414,10 +414,10 @@ public final class DefaultPassConfig extends PassConfig {
if (options.shouldRewriteModulesAfterTypechecking()) {
addModuleRewritingPasses(checks, options);
+ if (options.closurePass) {
checks.add(closureProvidesRequires);
}
-
-
+ }
// CheckSuspiciousCode requires type information, so must run after the type checker.
if (options.checkSuspiciousCode
