Skip to content

Commit 3043356

Browse files
committed
Moving the checkVars pass to before the later transpilation step
(rollforward of cl/99291555) ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=99420916
1 parent 4982ba6 commit 3043356

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/com/google/javascript/jscomp/DefaultPassConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ protected List<PassFactory> getChecks() {
289289
checks.add(createSyntheticBlocks);
290290
}
291291

292+
if (!options.skipNonTranspilationPasses) {
293+
checks.add(checkVars);
294+
}
295+
292296
// Late ES6 transpilation.
293297
// Includes ES6 features that are best handled natively by the compiler.
294298
// As we convert more passes to handle these features, we will be moving the transpilation
@@ -317,8 +321,6 @@ protected List<PassFactory> getChecks() {
317321

318322
// End of ES6 transpilation passes.
319323

320-
checks.add(checkVars);
321-
322324
if (options.inferConsts) {
323325
checks.add(inferConsts);
324326
}

0 commit comments

Comments
 (0)