Resolve an old TODO: This now uses Es6SyntacticScopeCreator unconditionally
@@ -430,15 +430,8 @@ class VariableReferenceCheck implements HotSwapCompilerPass {
boolean inGoogScope = false;
Scope s = v.getScope();
- Node function = null;
if (s.isFunctionBlockScope()) {
- function = s.getRootNode().getParent();
- } else if (s.isFunctionScope()) {
- // TODO(tbreisacher): Remove this branch when everything is switched to
- // Es6SyntacticScopeCreator.
- function = s.getRootNode();
- }
- if (function != null) {
+ Node function = s.getRootNode().getParent();
Node callee = function.getPrevious();
inGoogScope = callee != null && callee.matchesQualifiedName("goog.scope");
}
