@Override
  public boolean hasNonLocals() {
    if (myNonlocals == null || myNestedScopes == null) {
      collectDeclarations();
    }
    if (!myNonlocals.isEmpty()) return true;
    return myNestedScopes.stream().anyMatch(scope -> scope.hasNonLocals());
  }
@Override
  public boolean hasNonLocals()