code: Symbol accessInternal(Symbol sym,
                    DiagnosticPosition pos,
                    Symbol location,
                    Type site,
                    Name name,
                    boolean qualified,
                    List<Type> argtypes,
                    List<Type> typeargtypes,
                    LogResolveHelper logResolveHelper) {
          if (sym.kind.isResolutionError()) {
              ResolveError errSym = (ResolveError)sym.baseSymbol();
              sym = errSym.access(name, qualified ? site.tsym : syms.noSymbol);
              argtypes = logResolveHelper.getArgumentTypes(errSym, sym, name, argtypes);
              if (logResolveHelper.resolveDiagnosticNeeded(site, argtypes, typeargtypes)) {
                  logResolveError(errSym, pos, location, site, name, argtypes, typeargtypes);
              }
          }
          return sym;
      }
docs: If `sym' is a bad symbol: report error and return errSymbol
  else pass through unchanged,
  additional arguments duplicate what has been used in trying to find the
  symbol {@literal (--> flyweight pattern)}. This improves performance since we
  expect misses to happen frequently.
  
  @param sym       The symbol that was found, or a ResolveError.
  @param pos       The position to use for error reporting.
  @param location  The symbol the served as a context for this lookup
  @param site      The original type from where the selection took place.
  @param name      The symbol's name.
  @param qualified Did we get here through a qualified expression resolution?
  @param argtypes  The invocation's value arguments,
  if we looked for a method.
  @param typeargtypes  The invocation's type arguments,
  if we looked for a method.
  @param logResolveHelper helper class used to log resolve errors