third_party/closure-compiler/src/src/com/google/javascript/rhino/jstype/NamedType.java
/**
   * Check for an obscure but very confusing error condition where a local variable shadows a
   * global namespace.
   */
Check for an obscure but very confusing error condition where a local variable shadows a
global namespace.
Check for an obscure but very confusing error condition where a local variable shadows a global namespace .
private boolean localVariableShadowsGlobalNamespace(String root) {
    StaticSlot rootVar = resolutionScope.getSlot(root);
    if (rootVar != null) {
      StaticScope parent = rootVar.getScope().getParentScope();
      if (parent != null) {
        StaticSlot globalVar = parent.getSlot(root);
        return globalVar != null;
      }
    }
    return false;
  }
private boolean localVariableShadowsGlobalNamespace ( String root ) { StaticSlot rootVar = resolutionScope . getSlot ( root ) ; if ( rootVar != null ) { StaticScope parent = rootVar . getScope ( ) . getParentScope ( ) ; if ( parent != null ) { StaticSlot globalVar = parent . getSlot ( root ) ; return globalVar != null ; } } return false ; }
Check for an obscure but very confusing error condition where a local variable shadows a
 global namespace.
Check for an obscure but very confusing error condition where a local variable shadows a global namespace .