Moving ES6 module checking to after CheckRequiresAndProvidesSorted in DefaultPassConfig.
Part of verification/adding of ES6 module compatibility to compiler.
@@ -248,16 +248,16 @@ public final class DefaultPassConfig extends PassConfig {
checks.add(lintChecks);
}
+ if (options.closurePass && options.enables(DiagnosticGroups.LINT_CHECKS)) {
+ checks.add(checkRequiresAndProvidesSorted);
+ }
+
checks.add(es6CheckModule);
if (options.needsTranspilationOf(FeatureSet.Feature.MODULES)) {
TranspilationPasses.addEs6ModulePass(checks);
}
- if (options.closurePass && options.enables(DiagnosticGroups.LINT_CHECKS)) {
- checks.add(checkRequiresAndProvidesSorted);
- }
-
if (options.enables(DiagnosticGroups.MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.STRICT_MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.EXTRA_REQUIRE)) {
@@ -1994,7 +1994,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
protected FeatureSet featureSet() {
- return ES8;
+ return ES8_MODULES;
}
};
