boolean (final String name) { if (myGlobals == null || myNestedScopes == null) { collectDeclarations(); } if (myGlobals.contains(name)) { return true; } for (Scope scope : myNestedScopes) { if (scope.isGlobal(name)) { return true; } } return false; }