code: Symbol resolveDiamond(DiagnosticPosition pos,
                                Env<AttrContext> env,
                                Type site,
                                List<Type> argtypes,
                                List<Type> typeargtypes) {
          return lookupMethod(env, pos, site.tsym, resolveMethodCheck,
                  new BasicLookupHelper(names.init, site, argtypes, typeargtypes) {
                      @Override
                      Symbol doLookup(Env<AttrContext> env, MethodResolutionPhase phase) {
                          return findDiamond(env, site, argtypes, typeargtypes,
                                  phase.isBoxingRequired(),
                                  phase.isVarargsRequired());
                      }
                      @Override
                      Symbol access(Env<AttrContext> env, DiagnosticPosition pos, Symbol location, Symbol sym) {
                          if (sym.kind.isResolutionError()) {
                              if (sym.kind != WRONG_MTH &&
                                  sym.kind != WRONG_MTHS) {
                                  sym = super.access(env, pos, location, sym);
                              } else {
                                  final JCDiagnostic details = sym.kind == WRONG_MTH ?
                                                  ((InapplicableSymbolError)sym.baseSymbol()).errCandidate().snd :
                                                  null;
                                  sym = new DiamondError(sym, currentResolutionContext);
                                  sym = accessMethod(sym, pos, site, names.init, true, argtypes, typeargtypes);
                                  env.info.pendingResolutionPhase = currentResolutionContext.step;
                              }
                          }
                          return sym;
                      }});
      }
docs: Resolve constructor using diamond inference.
  @param pos       The position to use for error reporting.
  @param env       The environment current at the constructor invocation.
  @param site      The type of class for which a constructor is searched.
  The scope of this class has been touched in attribution.
  @param argtypes  The types of the constructor invocation's value
  arguments.
  @param typeargtypes  The types of the constructor invocation's type
  arguments.