Skip to content

Commit

Permalink
Fixes change tracking in VarCheck.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152940605
  • Loading branch information
stalcup authored and brad4d committed Apr 12, 2017
1 parent 6c01a3e commit cd1b85d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/com/google/javascript/jscomp/VarCheck.java
Expand Up @@ -265,8 +265,9 @@ static void createSynthesizedExternVar(AbstractCompiler compiler, String varName
nameNode.putBooleanProp(Node.IS_CONSTANT_NAME, true);
}

getSynthesizedExternsRoot(compiler).addChildToBack(IR.var(nameNode));
compiler.reportCodeChange();
Node syntheticExternVar = IR.var(nameNode);
getSynthesizedExternsRoot(compiler).addChildToBack(syntheticExternVar);
compiler.reportChangeToEnclosingScope(syntheticExternVar);
}

/**
Expand Down
1 change: 0 additions & 1 deletion test/com/google/javascript/jscomp/VarCheckTest.java
Expand Up @@ -42,7 +42,6 @@ protected void setUp() throws Exception {
super.setUp();
// Setup value set by individual tests to the appropriate defaults.
super.allowExternsChanges(true);
validateAstChangeMarking(false);
strictModuleDepErrorLevel = CheckLevel.OFF;
externValidationErrorLevel = null;
sanityCheck = false;
Expand Down

0 comments on commit cd1b85d

Please sign in to comment.