JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos,
                        Symbol location, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) {
                    String key = details == null ?
                        "cant.apply.diamond" :
                        "cant.apply.diamond.1";
                    return diags.create(dkind, log.currentSource(), pos, key,
                            diags.fragment("diamond", site.tsym), details);
                }