Moving ES6 module checking to after CheckRequires in DefaultPassConfig.
Part of verification/adding of ES6 module compatibility to compiler.
@@ -252,18 +252,18 @@ public final class DefaultPassConfig extends PassConfig {
checks.add(checkRequiresAndProvidesSorted);
}
- checks.add(es6CheckModule);
-
- if (options.needsTranspilationOf(FeatureSet.Feature.MODULES)) {
- TranspilationPasses.addEs6ModulePass(checks);
- }
-
if (options.enables(DiagnosticGroups.MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.STRICT_MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.EXTRA_REQUIRE)) {
checks.add(checkRequires);
}
+ checks.add(es6CheckModule);
+
+ if (options.needsTranspilationOf(FeatureSet.Feature.MODULES)) {
+ TranspilationPasses.addEs6ModulePass(checks);
+ }
+
checks.add(checkVariableReferences);
if (options.closurePass) {
