code: Symbol findGlobalType(Env<AttrContext> env, Scope scope, Name name, RecoveryLoadClass recoveryLoadClass) {
          Symbol bestSoFar = typeNotFound;
          for (Symbol s : scope.getSymbolsByName(name)) {
              Symbol sym = loadClass(env, s.flatName(), recoveryLoadClass);
              if (bestSoFar.kind == TYP && sym.kind == TYP &&
                  bestSoFar != sym)
                  return new AmbiguityError(bestSoFar, sym);
              else
                  bestSoFar = bestOf(bestSoFar, sym);
          }
          return bestSoFar;
      }
docs: Find a global type in given scope and load corresponding class.
  @param env       The current environment.
  @param scope     The scope in which to look for the type.
  @param name      The type's name.