6968793: issues with diagnostics

Mon, 24 Jan 2011 15:44:51 +0000

author
mcimadamore
date
Mon, 24 Jan 2011 15:44:51 +0000
changeset 829
ce6175cfe11e
parent 828
19c900c703c6
child 830
02e6e7dd1a64

6968793: issues with diagnostics
Summary: several diagnostic improvements
Reviewed-by: jjg

src/share/classes/com/sun/tools/javac/comp/Attr.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/comp/Check.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/comp/MemberEnter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/comp/Resolve.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/resources/compiler.properties file | annotate | diff | comparison | revisions
test/tools/javac/6304921/T6304921.out file | annotate | diff | comparison | revisions
test/tools/javac/6330920/T6330920.out file | annotate | diff | comparison | revisions
test/tools/javac/6717241/T6717241a.out file | annotate | diff | comparison | revisions
test/tools/javac/6717241/T6717241b.out file | annotate | diff | comparison | revisions
test/tools/javac/6857948/T6857948.out file | annotate | diff | comparison | revisions
test/tools/javac/6863465/T6863465c.out file | annotate | diff | comparison | revisions
test/tools/javac/6863465/T6863465d.out file | annotate | diff | comparison | revisions
test/tools/javac/T6247324.out file | annotate | diff | comparison | revisions
test/tools/javac/TryWithResources/ResourceOutsideTry.out file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples.not-yet.txt file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/CantResolve.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/CantResolveArgsParams.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/CantResolveLocation.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/CantResolveLocationArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/CantResolveLocationArgsParams.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/EnumConstRequired.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/ForeachNotApplicable.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/KindnameClass.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/KindnameMethod.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/KindnameVariable.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/Location.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/Location1.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/OperatorCantBeApplied.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/OperatorCantBeApplied1.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/examples/StaticImportOnlyClassesAndInterfaces/StaticImportOnlyClassesAndInterfaces.java file | annotate | diff | comparison | revisions
test/tools/javac/failover/FailOver01.out file | annotate | diff | comparison | revisions
test/tools/javac/failover/FailOver02.out file | annotate | diff | comparison | revisions
test/tools/javac/failover/FailOver04.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/6711619/T6711619a.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/diamond/neg/Neg01.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/diamond/neg/Neg02.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/diamond/neg/Neg03.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/diamond/neg/Neg04.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/diamond/neg/Neg11.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/inference/6943278/T6943278.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/typevars/5060485/Compatibility.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/typevars/5060485/Compatibility02.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/typevars/6968793/T6968793.java file | annotate | diff | comparison | revisions
test/tools/javac/generics/typevars/6968793/T6968793.out file | annotate | diff | comparison | revisions
test/tools/javac/policy/test1/byfile.ABD.out file | annotate | diff | comparison | revisions
test/tools/javac/policy/test1/bytodo.ABD.out file | annotate | diff | comparison | revisions
test/tools/javac/policy/test1/simple.ABD.out file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 24 15:44:15 2011 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 24 15:44:51 2011 +0000
     1.3 @@ -905,7 +905,10 @@
     1.4              // or perhaps expr implements Iterable<T>?
     1.5              Type base = types.asSuper(exprType, syms.iterableType.tsym);
     1.6              if (base == null) {
     1.7 -                log.error(tree.expr.pos(), "foreach.not.applicable.to.type");
     1.8 +                log.error(tree.expr.pos(),
     1.9 +                        "foreach.not.applicable.to.type",
    1.10 +                        exprType,
    1.11 +                        diags.fragment("type.req.array.or.iterable"));
    1.12                  elemtype = types.createErrorType(exprType);
    1.13              } else {
    1.14                  List<Type> iterableParams = base.allparams();
    1.15 @@ -970,7 +973,7 @@
    1.16                  if (enumSwitch) {
    1.17                      Symbol sym = enumConstant(c.pat, seltype);
    1.18                      if (sym == null) {
    1.19 -                        log.error(c.pat.pos(), "enum.const.req");
    1.20 +                        log.error(c.pat.pos(), "enum.label.must.be.unqualified.enum");
    1.21                      } else if (!labels.add(sym)) {
    1.22                          log.error(c.pos(), "duplicate.case.label");
    1.23                      }
    1.24 @@ -2228,10 +2231,10 @@
    1.25  
    1.26          // Determine the symbol represented by the selection.
    1.27          env.info.varArgs = false;
    1.28 -        Symbol sym = selectSym(tree, site, env, pt, pkind);
    1.29 +        Symbol sym = selectSym(tree, sitesym, site, env, pt, pkind);
    1.30          if (sym.exists() && !isType(sym) && (pkind & (PCK | TYP)) != 0) {
    1.31              site = capture(site);
    1.32 -            sym = selectSym(tree, site, env, pt, pkind);
    1.33 +            sym = selectSym(tree, sitesym, site, env, pt, pkind);
    1.34          }
    1.35          boolean varArgs = env.info.varArgs;
    1.36          tree.sym = sym;
    1.37 @@ -2320,6 +2323,14 @@
    1.38           *  @param pkind  The expected kind(s) of the Select expression.
    1.39           */
    1.40          private Symbol selectSym(JCFieldAccess tree,
    1.41 +                                     Type site,
    1.42 +                                     Env<AttrContext> env,
    1.43 +                                     Type pt,
    1.44 +                                     int pkind) {
    1.45 +            return selectSym(tree, site.tsym, site, env, pt, pkind);
    1.46 +        }
    1.47 +        private Symbol selectSym(JCFieldAccess tree,
    1.48 +                                 Symbol location,
    1.49                                   Type site,
    1.50                                   Env<AttrContext> env,
    1.51                                   Type pt,
    1.52 @@ -2331,12 +2342,12 @@
    1.53              case PACKAGE:
    1.54                  return rs.access(
    1.55                      rs.findIdentInPackage(env, site.tsym, name, pkind),
    1.56 -                    pos, site, name, true);
    1.57 +                    pos, location, site, name, true);
    1.58              case ARRAY:
    1.59              case CLASS:
    1.60                  if (pt.tag == METHOD || pt.tag == FORALL) {
    1.61                      return rs.resolveQualifiedMethod(
    1.62 -                        pos, env, site, name, pt.getParameterTypes(), pt.getTypeArguments());
    1.63 +                        pos, env, location, site, name, pt.getParameterTypes(), pt.getTypeArguments());
    1.64                  } else if (name == names._this || name == names._super) {
    1.65                      return rs.resolveSelf(pos, env, site.tsym, name);
    1.66                  } else if (name == names._class) {
    1.67 @@ -2353,7 +2364,7 @@
    1.68                      // We are seeing a plain identifier as selector.
    1.69                      Symbol sym = rs.findIdentInType(env, site, name, pkind);
    1.70                      if ((pkind & ERRONEOUS) == 0)
    1.71 -                        sym = rs.access(sym, pos, site, name, true);
    1.72 +                        sym = rs.access(sym, pos, location, site, name, true);
    1.73                      return sym;
    1.74                  }
    1.75              case WILDCARD:
    1.76 @@ -2361,12 +2372,12 @@
    1.77              case TYPEVAR:
    1.78                  // Normally, site.getUpperBound() shouldn't be null.
    1.79                  // It should only happen during memberEnter/attribBase
    1.80 -                // when determining the super type which *must* be
    1.81 +                // when determining the super type which *must* beac
    1.82                  // done before attributing the type variables.  In
    1.83                  // other words, we are seeing this illegal program:
    1.84                  // class B<T> extends A<T.foo> {}
    1.85                  Symbol sym = (site.getUpperBound() != null)
    1.86 -                    ? selectSym(tree, capture(site.getUpperBound()), env, pt, pkind)
    1.87 +                    ? selectSym(tree, location, capture(site.getUpperBound()), env, pt, pkind)
    1.88                      : null;
    1.89                  if (sym == null) {
    1.90                      log.error(pos, "type.var.cant.be.deref");
    1.91 @@ -2375,7 +2386,7 @@
    1.92                      Symbol sym2 = (sym.flags() & Flags.PRIVATE) != 0 ?
    1.93                          rs.new AccessError(env, site, sym) :
    1.94                                  sym;
    1.95 -                    rs.access(sym2, pos, site, name, true);
    1.96 +                    rs.access(sym2, pos, location, site, name, true);
    1.97                      return sym;
    1.98                  }
    1.99              case ERROR:
     2.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 24 15:44:15 2011 +0000
     2.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 24 15:44:51 2011 +0000
     2.3 @@ -1042,10 +1042,13 @@
     2.4                  if (incompatibleArg != null) {
     2.5                      for (JCTree arg : tree.arguments) {
     2.6                          if (arg.type == incompatibleArg) {
     2.7 -                            log.error(arg, "not.within.bounds", incompatibleArg);
     2.8 +                            log.error(arg, "not.within.bounds", incompatibleArg, forms.head);
     2.9                          }
    2.10 -                    }
    2.11 -                }
    2.12 +                        forms = forms.tail;
    2.13 +                     }
    2.14 +                 }
    2.15 +
    2.16 +                forms = tree.type.tsym.type.getTypeArguments();
    2.17  
    2.18                  boolean is_java_lang_Class = tree.type.tsym.flatName() == names.java_lang_Class;
    2.19  
     3.1 --- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Jan 24 15:44:15 2011 +0000
     3.2 +++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Jan 24 15:44:51 2011 +0000
     3.3 @@ -984,7 +984,7 @@
     3.4                  c.owner.kind == PCK && c.owner != syms.unnamedPackage &&
     3.5                  reader.packageExists(c.fullname))
     3.6                  {
     3.7 -                    log.error(tree.pos, "clash.with.pkg.of.same.name", c);
     3.8 +                    log.error(tree.pos, "clash.with.pkg.of.same.name", Kinds.kindName(sym), c);
     3.9                  }
    3.10  
    3.11          } catch (CompletionFailure ex) {
     4.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Jan 24 15:44:15 2011 +0000
     4.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Jan 24 15:44:51 2011 +0000
     4.3 @@ -1236,6 +1236,7 @@
     4.4       */
     4.5      Symbol access(Symbol sym,
     4.6                    DiagnosticPosition pos,
     4.7 +                  Symbol location,
     4.8                    Type site,
     4.9                    Name name,
    4.10                    boolean qualified,
    4.11 @@ -1246,23 +1247,46 @@
    4.12              if (!site.isErroneous() &&
    4.13                  !Type.isErroneous(argtypes) &&
    4.14                  (typeargtypes==null || !Type.isErroneous(typeargtypes)))
    4.15 -                logResolveError(errSym, pos, site, name, argtypes, typeargtypes);
    4.16 +                logResolveError(errSym, pos, location, site, name, argtypes, typeargtypes);
    4.17              sym = errSym.access(name, qualified ? site.tsym : syms.noSymbol);
    4.18          }
    4.19          return sym;
    4.20      }
    4.21  
    4.22 -    /** Same as above, but without type arguments and arguments.
    4.23 +    /** Same as original access(), but without location.
    4.24 +     */
    4.25 +    Symbol access(Symbol sym,
    4.26 +                  DiagnosticPosition pos,
    4.27 +                  Type site,
    4.28 +                  Name name,
    4.29 +                  boolean qualified,
    4.30 +                  List<Type> argtypes,
    4.31 +                  List<Type> typeargtypes) {
    4.32 +        return access(sym, pos, site.tsym, site, name, qualified, argtypes, typeargtypes);
    4.33 +    }
    4.34 +
    4.35 +    /** Same as original access(), but without type arguments and arguments.
    4.36 +     */
    4.37 +    Symbol access(Symbol sym,
    4.38 +                  DiagnosticPosition pos,
    4.39 +                  Symbol location,
    4.40 +                  Type site,
    4.41 +                  Name name,
    4.42 +                  boolean qualified) {
    4.43 +        if (sym.kind >= AMBIGUOUS)
    4.44 +            return access(sym, pos, location, site, name, qualified, List.<Type>nil(), null);
    4.45 +        else
    4.46 +            return sym;
    4.47 +    }
    4.48 +
    4.49 +    /** Same as original access(), but without location, type arguments and arguments.
    4.50       */
    4.51      Symbol access(Symbol sym,
    4.52                    DiagnosticPosition pos,
    4.53                    Type site,
    4.54                    Name name,
    4.55                    boolean qualified) {
    4.56 -        if (sym.kind >= AMBIGUOUS)
    4.57 -            return access(sym, pos, site, name, qualified, List.<Type>nil(), null);
    4.58 -        else
    4.59 -            return sym;
    4.60 +        return access(sym, pos, site.tsym, site, name, qualified);
    4.61      }
    4.62  
    4.63      /** Check that sym is not an abstract method.
    4.64 @@ -1380,6 +1404,11 @@
    4.65      Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env,
    4.66                                    Type site, Name name, List<Type> argtypes,
    4.67                                    List<Type> typeargtypes) {
    4.68 +        return resolveQualifiedMethod(pos, env, site.tsym, site, name, argtypes, typeargtypes);
    4.69 +    }
    4.70 +    Symbol resolveQualifiedMethod(DiagnosticPosition pos, Env<AttrContext> env,
    4.71 +                                  Symbol location, Type site, Name name, List<Type> argtypes,
    4.72 +                                  List<Type> typeargtypes) {
    4.73          Symbol sym = startResolution();
    4.74          List<MethodResolutionPhase> steps = methodResolutionSteps;
    4.75          while (steps.nonEmpty() &&
    4.76 @@ -1404,7 +1433,7 @@
    4.77                  MethodResolutionPhase errPhase =
    4.78                          firstErroneousResolutionPhase();
    4.79                  sym = access(methodResolutionCache.get(errPhase),
    4.80 -                        pos, site, name, true, argtypes, typeargtypes);
    4.81 +                        pos, location, site, name, true, argtypes, typeargtypes);
    4.82                  env.info.varArgs = errPhase.isVarargsRequired;
    4.83              }
    4.84          } else if (allowMethodHandles && sym.isPolymorphicSignatureGeneric()) {
    4.85 @@ -1471,7 +1500,7 @@
    4.86                                          List<Type> argtypes,
    4.87                                          List<Type> typeargtypes) {
    4.88          Symbol sym = resolveQualifiedMethod(
    4.89 -            pos, env, site, name, argtypes, typeargtypes);
    4.90 +            pos, env, site.tsym, site, name, argtypes, typeargtypes);
    4.91          if (sym.kind == MTH) return (MethodSymbol)sym;
    4.92          else throw new FatalError(
    4.93                   diags.fragment("fatal.err.cant.locate.meth",
    4.94 @@ -1546,11 +1575,13 @@
    4.95                  null;
    4.96              Symbol errSym = new ResolveError(WRONG_MTH, "diamond error") {
    4.97                  @Override
    4.98 -                JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) {
    4.99 +                JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos,
   4.100 +                        Symbol location, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) {
   4.101                      String key = details == null ?
   4.102                          "cant.apply.diamond" :
   4.103                          "cant.apply.diamond.1";
   4.104 -                    return diags.create(dkind, log.currentSource(), pos, key, diags.fragment("diamond", site.tsym), details);
   4.105 +                    return diags.create(dkind, log.currentSource(), pos, key,
   4.106 +                            diags.fragment("diamond", site.tsym), details);
   4.107                  }
   4.108              };
   4.109              MethodResolutionPhase errPhase = firstErroneousResolutionPhase();
   4.110 @@ -1729,17 +1760,18 @@
   4.111  
   4.112      public void logAccessError(Env<AttrContext> env, JCTree tree, Type type) {
   4.113          AccessError error = new AccessError(env, type.getEnclosingType(), type.tsym);
   4.114 -        logResolveError(error, tree.pos(), type.getEnclosingType(), null, null, null);
   4.115 +        logResolveError(error, tree.pos(), type.getEnclosingType().tsym, type.getEnclosingType(), null, null, null);
   4.116      }
   4.117      //where
   4.118      private void logResolveError(ResolveError error,
   4.119              DiagnosticPosition pos,
   4.120 +            Symbol location,
   4.121              Type site,
   4.122              Name name,
   4.123              List<Type> argtypes,
   4.124              List<Type> typeargtypes) {
   4.125          JCDiagnostic d = error.getDiagnostic(JCDiagnostic.DiagnosticType.ERROR,
   4.126 -                pos, site, name, argtypes, typeargtypes);
   4.127 +                pos, location, site, name, argtypes, typeargtypes);
   4.128          if (d != null) {
   4.129              d.setFlag(DiagnosticFlag.RESOLVE_ERROR);
   4.130              log.report(d);
   4.131 @@ -1809,6 +1841,7 @@
   4.132           */
   4.133          abstract JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.134                  DiagnosticPosition pos,
   4.135 +                Symbol location,
   4.136                  Type site,
   4.137                  Name name,
   4.138                  List<Type> argtypes,
   4.139 @@ -1874,6 +1907,7 @@
   4.140          @Override
   4.141          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.142                  DiagnosticPosition pos,
   4.143 +                Symbol location,
   4.144                  Type site,
   4.145                  Name name,
   4.146                  List<Type> argtypes,
   4.147 @@ -1884,16 +1918,23 @@
   4.148                  return null;
   4.149  
   4.150              if (isOperator(name)) {
   4.151 +                boolean isUnaryOp = argtypes.size() == 1;
   4.152 +                String key = argtypes.size() == 1 ?
   4.153 +                    "operator.cant.be.applied" :
   4.154 +                    "operator.cant.be.applied.1";
   4.155 +                Type first = argtypes.head;
   4.156 +                Type second = !isUnaryOp ? argtypes.tail.head : null;
   4.157                  return diags.create(dkind, log.currentSource(), pos,
   4.158 -                        "operator.cant.be.applied", name, argtypes);
   4.159 +                        key, name, first, second);
   4.160              }
   4.161              boolean hasLocation = false;
   4.162 -            if (!site.tsym.name.isEmpty()) {
   4.163 -                if (site.tsym.kind == PCK && !site.tsym.exists()) {
   4.164 +            if (!location.name.isEmpty()) {
   4.165 +                if (location.kind == PCK && !site.tsym.exists()) {
   4.166                      return diags.create(dkind, log.currentSource(), pos,
   4.167 -                        "doesnt.exist", site.tsym);
   4.168 +                        "doesnt.exist", location);
   4.169                  }
   4.170 -                hasLocation = true;
   4.171 +                hasLocation = !location.name.equals(names._this) &&
   4.172 +                        !location.name.equals(names._super);
   4.173              }
   4.174              boolean isConstructor = kind == ABSENT_MTH &&
   4.175                      name == names.table.names.init;
   4.176 @@ -1904,7 +1945,7 @@
   4.177                  return diags.create(dkind, log.currentSource(), pos,
   4.178                          errKey, kindname, idname, //symbol kindname, name
   4.179                          typeargtypes, argtypes, //type parameters and arguments (if any)
   4.180 -                        typeKindName(site), site); //location kindname, type
   4.181 +                        getLocationDiag(location)); //location kindname, type
   4.182              }
   4.183              else {
   4.184                  return diags.create(dkind, log.currentSource(), pos,
   4.185 @@ -1925,6 +1966,16 @@
   4.186              }
   4.187              return key + suffix;
   4.188          }
   4.189 +        private JCDiagnostic getLocationDiag(Symbol location) {
   4.190 +            boolean isVar = location.kind == VAR;
   4.191 +            String key = isVar ?
   4.192 +                "location.1" :
   4.193 +                "location";
   4.194 +            return diags.fragment(key,
   4.195 +                    kindName(location),
   4.196 +                    location,
   4.197 +                    isVar ? location.type : null);
   4.198 +        }
   4.199      }
   4.200  
   4.201      /**
   4.202 @@ -1965,6 +2016,7 @@
   4.203          @Override
   4.204          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.205                  DiagnosticPosition pos,
   4.206 +                Symbol location,
   4.207                  Type site,
   4.208                  Name name,
   4.209                  List<Type> argtypes,
   4.210 @@ -2016,6 +2068,7 @@
   4.211          @Override
   4.212          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.213                  DiagnosticPosition pos,
   4.214 +                Symbol location,
   4.215                  Type site,
   4.216                  Name name,
   4.217                  List<Type> argtypes,
   4.218 @@ -2031,7 +2084,7 @@
   4.219                  return new JCDiagnostic.MultilineDiagnostic(err, candidateDetails(site));
   4.220              } else {
   4.221                  return new SymbolNotFoundError(ABSENT_MTH).getDiagnostic(dkind, pos,
   4.222 -                    site, name, argtypes, typeargtypes);
   4.223 +                    location, site, name, argtypes, typeargtypes);
   4.224              }
   4.225          }
   4.226  
   4.227 @@ -2131,6 +2184,7 @@
   4.228          @Override
   4.229          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.230                  DiagnosticPosition pos,
   4.231 +                Symbol location,
   4.232                  Type site,
   4.233                  Name name,
   4.234                  List<Type> argtypes,
   4.235 @@ -2140,7 +2194,7 @@
   4.236  
   4.237              if (sym.name == names.init && sym.owner != site.tsym) {
   4.238                  return new SymbolNotFoundError(ABSENT_MTH).getDiagnostic(dkind,
   4.239 -                        pos, site, name, argtypes, typeargtypes);
   4.240 +                        pos, location, site, name, argtypes, typeargtypes);
   4.241              }
   4.242              else if ((sym.flags() & PUBLIC) != 0
   4.243                  || (env != null && this.site != null
   4.244 @@ -2175,6 +2229,7 @@
   4.245          @Override
   4.246          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.247                  DiagnosticPosition pos,
   4.248 +                Symbol location,
   4.249                  Type site,
   4.250                  Name name,
   4.251                  List<Type> argtypes,
   4.252 @@ -2205,6 +2260,7 @@
   4.253          @Override
   4.254          JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,
   4.255                  DiagnosticPosition pos,
   4.256 +                Symbol location,
   4.257                  Type site,
   4.258                  Name name,
   4.259                  List<Type> argtypes,
     5.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jan 24 15:44:15 2011 +0000
     5.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jan 24 15:44:51 2011 +0000
     5.3 @@ -112,11 +112,9 @@
     5.4  compiler.err.catch.without.try=\
     5.5      ''catch'' without ''try''
     5.6  compiler.err.clash.with.pkg.of.same.name=\
     5.7 -    {0} clashes with package of same name
     5.8 +    {0} {1} clashes with package of same name
     5.9  compiler.err.const.expr.req=\
    5.10      constant expression required
    5.11 -compiler.err.enum.const.req=\
    5.12 -    unqualified enumeration constant name required
    5.13  compiler.err.cont.outside.loop=\
    5.14      continue outside of loop
    5.15  compiler.err.cyclic.inheritance=\
    5.16 @@ -184,7 +182,9 @@
    5.17  compiler.err.finally.without.try=\
    5.18      ''finally'' without ''try''
    5.19  compiler.err.foreach.not.applicable.to.type=\
    5.20 -    foreach not applicable to expression type
    5.21 +    for-each not applicable to expression type\n\
    5.22 +    required: {1}\n\
    5.23 +    found:    {0}
    5.24  compiler.err.fp.number.too.large=\
    5.25      floating point number too large
    5.26  compiler.err.fp.number.too.small=\
    5.27 @@ -238,7 +238,7 @@
    5.28  compiler.err.improperly.formed.type.param.missing=\
    5.29      improperly formed type, some parameters are missing
    5.30  compiler.err.improperly.formed.type.inner.raw.param=\
    5.31 -    improperly formed type, type parameters given on a raw type
    5.32 +    improperly formed type, type arguments given on a raw type
    5.33  compiler.err.incomparable.types=\
    5.34      incomparable types: {0} and {1}
    5.35  compiler.err.int.number.too.large=\
    5.36 @@ -354,7 +354,11 @@
    5.37      not an enclosing class: {0}
    5.38  
    5.39  compiler.err.operator.cant.be.applied=\
    5.40 -    operator {0} cannot be applied to {1}
    5.41 +    bad operand type {1} for unary operator ''{0}''
    5.42 +compiler.err.operator.cant.be.applied.1=\
    5.43 +    bad operand types for binary operator ''{0}''\n\
    5.44 +    first type:  {1}\n\
    5.45 +    second type: {2}
    5.46  
    5.47  compiler.err.pkg.annotations.sb.in.package-info.java=\
    5.48      package annotations should be in file package-info.java
    5.49 @@ -481,9 +485,10 @@
    5.50  compiler.err.undef.label=\
    5.51      undefined label: {0}
    5.52  compiler.err.undetermined.type=\
    5.53 -    type parameters of {0} cannot be determined
    5.54 +    cannot infer type arguments for {0}
    5.55  compiler.err.undetermined.type.1=\
    5.56 -    type parameters of {0} cannot be determined; {1}
    5.57 +    cannot infer type arguments for {0};\n\
    5.58 +    reason: {1}
    5.59  compiler.err.invalid.inferred.types=\
    5.60      invalid inferred types for {0}; {1}
    5.61  compiler.err.cant.apply.diamond=\
    5.62 @@ -863,7 +868,7 @@
    5.63  
    5.64  compiler.warn.raw.class.use=\
    5.65      found raw type: {0}\n\
    5.66 -    missing type parameters for generic class {1}
    5.67 +    missing type arguments for generic class {1}
    5.68  
    5.69  compiler.warn.diamond.redundant.args=\
    5.70      redundant type arguments in new expression (use diamond operator instead).
    5.71 @@ -991,10 +996,7 @@
    5.72  #####
    5.73  
    5.74  compiler.err.not.within.bounds=\
    5.75 -    type parameter {0} is not within its bound
    5.76 -
    5.77 -compiler.err.not.within.bounds.explain=\
    5.78 -    type parameter {0} is not within its bound; {1}
    5.79 +    type argument {0} is not within bounds of type-variable {1}
    5.80  
    5.81  ## The following are all possible strings for the second argument ({1}) of the
    5.82  ## above string.
    5.83 @@ -1061,6 +1063,8 @@
    5.84      class
    5.85  compiler.misc.type.req.class.array=\
    5.86      class or array
    5.87 +compiler.misc.type.req.array.or.iterable=\
    5.88 +    array or java.lang.Iterable
    5.89  compiler.misc.type.req.ref=\
    5.90      reference
    5.91  compiler.misc.type.req.exact=\
    5.92 @@ -1144,22 +1148,31 @@
    5.93      symbol: {0} <{2}>{1}({3})
    5.94  
    5.95  ## arguments from {0} to {3} have the same meaning as above
    5.96 -## The fifth argument {4} is the location "kindname" (e.g. 'constructor', 'field', etc.)
    5.97 -## The sixth argument {5} is the location type
    5.98 +## The fifth argument {4} is a location subdiagnostic (see below)
    5.99  compiler.err.cant.resolve.location=\
   5.100      cannot find symbol\n\
   5.101      symbol:   {0} {1}\n\
   5.102 -    location: {4} {5}
   5.103 +    location: {4}
   5.104  
   5.105  compiler.err.cant.resolve.location.args=\
   5.106      cannot find symbol\n\
   5.107      symbol:   {0} {1}({3})\n\
   5.108 -    location: {4} {5}
   5.109 +    location: {4}
   5.110  
   5.111  compiler.err.cant.resolve.location.args.params=\
   5.112      cannot find symbol\n\
   5.113      symbol:   {0} <{2}>{1}({3})\n\
   5.114 -    location: {4} {5}
   5.115 +    location: {4}
   5.116 +
   5.117 +##a location subdiagnostic is composed as follows:
   5.118 +## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.)
   5.119 +## The second argument {1} is the location name
   5.120 +## The third argument {2} is the location type (only when {1} is a variable name)
   5.121 +
   5.122 +compiler.misc.location=\
   5.123 +    {0} {1}
   5.124 +compiler.misc.location.1=\
   5.125 +    {0} {1} of type {2}
   5.126  
   5.127  ## The following are all possible string for "kindname".
   5.128  ## They should be called whatever the JLS calls them after it been translated
     6.1 --- a/test/tools/javac/6304921/T6304921.out	Mon Jan 24 15:44:15 2011 +0000
     6.2 +++ b/test/tools/javac/6304921/T6304921.out	Mon Jan 24 15:44:51 2011 +0000
     6.3 @@ -1,7 +1,7 @@
     6.4  T6304921.java:29:34: compiler.warn.raw.class.use: java.util.ArrayList, java.util.ArrayList<E>
     6.5  T6304921.java:29:30: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.ArrayList, java.util.List<java.lang.Integer>
     6.6  - compiler.err.warnings.and.werror
     6.7 -T6304921.java:35:15: compiler.err.cant.resolve.location: kindname.variable, orr, , , kindname.class, java.lang.System
     6.8 -T6304921.java:38:20: compiler.err.operator.cant.be.applied: +, int,boolean
     6.9 +T6304921.java:35:15: compiler.err.cant.resolve.location: kindname.variable, orr, , , (compiler.misc.location: kindname.class, java.lang.System, null)
    6.10 +T6304921.java:38:20: compiler.err.operator.cant.be.applied.1: +, int, boolean
    6.11  3 errors
    6.12  2 warnings
     7.1 --- a/test/tools/javac/6330920/T6330920.out	Mon Jan 24 15:44:15 2011 +0000
     7.2 +++ b/test/tools/javac/6330920/T6330920.out	Mon Jan 24 15:44:51 2011 +0000
     7.3 @@ -1,2 +1,2 @@
     7.4 -T6330920.java:11:22: compiler.err.cant.resolve.location: kindname.class, T6330920Missing, , , kindname.class, T6330920
     7.5 +T6330920.java:11:22: compiler.err.cant.resolve.location: kindname.class, T6330920Missing, , , (compiler.misc.location: kindname.class, T6330920, null)
     7.6  1 error
     8.1 --- a/test/tools/javac/6717241/T6717241a.out	Mon Jan 24 15:44:15 2011 +0000
     8.2 +++ b/test/tools/javac/6717241/T6717241a.out	Mon Jan 24 15:44:51 2011 +0000
     8.3 @@ -1,4 +1,4 @@
     8.4 -T6717241a.java:13:21: compiler.err.cant.resolve: kindname.variable, v, , 
     8.5 -T6717241a.java:15:10: compiler.err.cant.resolve.args: kindname.method, m1, , int,java.lang.String
     8.6 -T6717241a.java:17:10: compiler.err.cant.resolve.args.params: kindname.method, m2, java.lang.Integer,java.lang.Double, int,java.lang.String
     8.7 +T6717241a.java:13:21: compiler.err.cant.resolve.location: kindname.variable, v, , , (compiler.misc.location.1: kindname.variable, x, X)
     8.8 +T6717241a.java:15:10: compiler.err.cant.resolve.location.args: kindname.method, m1, , int,java.lang.String, (compiler.misc.location.1: kindname.variable, x, X)
     8.9 +T6717241a.java:17:10: compiler.err.cant.resolve.location.args.params: kindname.method, m2, java.lang.Integer,java.lang.Double, int,java.lang.String, (compiler.misc.location.1: kindname.variable, x, X)
    8.10  3 errors
     9.1 --- a/test/tools/javac/6717241/T6717241b.out	Mon Jan 24 15:44:15 2011 +0000
     9.2 +++ b/test/tools/javac/6717241/T6717241b.out	Mon Jan 24 15:44:51 2011 +0000
     9.3 @@ -1,4 +1,4 @@
     9.4 -T6717241b.java:12:20: compiler.err.cant.resolve.location: kindname.variable, v, , , kindname.class, T6717241b
     9.5 -T6717241b.java:14:9: compiler.err.cant.resolve.location.args: kindname.method, m1, , int,java.lang.String, kindname.class, T6717241b
     9.6 -T6717241b.java:16:18: compiler.err.cant.resolve.location.args.params: kindname.method, m2, java.lang.Integer,java.lang.Double, int,java.lang.String, kindname.class, T6717241b
     9.7 +T6717241b.java:12:20: compiler.err.cant.resolve.location: kindname.variable, v, , , (compiler.misc.location: kindname.class, T6717241b, null)
     9.8 +T6717241b.java:14:9: compiler.err.cant.resolve.location.args: kindname.method, m1, , int,java.lang.String, (compiler.misc.location: kindname.class, T6717241b, null)
     9.9 +T6717241b.java:16:18: compiler.err.cant.resolve.location.args.params: kindname.method, m2, java.lang.Integer,java.lang.Double, int,java.lang.String, (compiler.misc.location: kindname.class, T6717241b, null)
    9.10  3 errors
    10.1 --- a/test/tools/javac/6857948/T6857948.out	Mon Jan 24 15:44:15 2011 +0000
    10.2 +++ b/test/tools/javac/6857948/T6857948.out	Mon Jan 24 15:44:51 2011 +0000
    10.3 @@ -1,3 +1,3 @@
    10.4 -T6857948.java:16:32: compiler.err.cant.resolve.location.args: kindname.method, nosuchfunction, , , kindname.class, Test
    10.5 +T6857948.java:16:32: compiler.err.cant.resolve.location.args: kindname.method, nosuchfunction, , , (compiler.misc.location: kindname.class, Test, null)
    10.6  T6857948.java:16:50: compiler.err.cant.apply.symbol.1: kindname.constructor, Foo, java.lang.String, compiler.misc.no.args, kindname.class, Foo, (compiler.misc.arg.length.mismatch)
    10.7  2 errors
    11.1 --- a/test/tools/javac/6863465/T6863465c.out	Mon Jan 24 15:44:15 2011 +0000
    11.2 +++ b/test/tools/javac/6863465/T6863465c.out	Mon Jan 24 15:44:51 2011 +0000
    11.3 @@ -1,3 +1,3 @@
    11.4 -T6863465c.java:13:47: compiler.err.cant.resolve.location: kindname.class, d, , , kindname.class, T6863465c.z
    11.5 +T6863465c.java:13:47: compiler.err.cant.resolve.location: kindname.class, d, , , (compiler.misc.location: kindname.class, T6863465c.z, null)
    11.6  T6863465c.java:11:12: compiler.err.cyclic.inheritance: T6863465c.z
    11.7  2 errors
    12.1 --- a/test/tools/javac/6863465/T6863465d.out	Mon Jan 24 15:44:15 2011 +0000
    12.2 +++ b/test/tools/javac/6863465/T6863465d.out	Mon Jan 24 15:44:51 2011 +0000
    12.3 @@ -1,3 +1,3 @@
    12.4 -T6863465d.java:13:47: compiler.err.cant.resolve.location: kindname.class, w, , , kindname.class, T6863465d.c
    12.5 +T6863465d.java:13:47: compiler.err.cant.resolve.location: kindname.class, w, , , (compiler.misc.location: kindname.class, T6863465d.c, null)
    12.6  T6863465d.java:11:12: compiler.err.cyclic.inheritance: T6863465d.c
    12.7  2 errors
    13.1 --- a/test/tools/javac/T6247324.out	Mon Jan 24 15:44:15 2011 +0000
    13.2 +++ b/test/tools/javac/T6247324.out	Mon Jan 24 15:44:51 2011 +0000
    13.3 @@ -1,2 +1,2 @@
    13.4 -T6247324.java:18:6: compiler.err.cant.resolve.location: kindname.class, Seetharam, , , kindname.class, Pair<X,Y>
    13.5 +T6247324.java:18:6: compiler.err.cant.resolve.location: kindname.class, Seetharam, , , (compiler.misc.location: kindname.class, Pair, null)
    13.6  1 error
    14.1 --- a/test/tools/javac/TryWithResources/ResourceOutsideTry.out	Mon Jan 24 15:44:15 2011 +0000
    14.2 +++ b/test/tools/javac/TryWithResources/ResourceOutsideTry.out	Mon Jan 24 15:44:51 2011 +0000
    14.3 @@ -1,3 +1,3 @@
    14.4 -ResourceOutsideTry.java:14:13: compiler.err.cant.resolve.location: kindname.variable, c, , , kindname.class, ResourceOutsideTry
    14.5 -ResourceOutsideTry.java:16:13: compiler.err.cant.resolve.location: kindname.variable, c, , , kindname.class, ResourceOutsideTry
    14.6 +ResourceOutsideTry.java:14:13: compiler.err.cant.resolve.location: kindname.variable, c, , , (compiler.misc.location: kindname.class, ResourceOutsideTry, null)
    14.7 +ResourceOutsideTry.java:16:13: compiler.err.cant.resolve.location: kindname.variable, c, , , (compiler.misc.location: kindname.class, ResourceOutsideTry, null)
    14.8  2 errors
    15.1 --- a/test/tools/javac/diags/examples.not-yet.txt	Mon Jan 24 15:44:15 2011 +0000
    15.2 +++ b/test/tools/javac/diags/examples.not-yet.txt	Mon Jan 24 15:44:51 2011 +0000
    15.3 @@ -24,7 +24,6 @@
    15.4  compiler.err.no.encl.instance.of.type.in.scope          # cannot occur; always followed by assert false;
    15.5  compiler.err.no.match.entry                             # UNUSED?
    15.6  compiler.err.not.annotation.type                        # cannot occur given preceding checkType
    15.7 -compiler.err.not.within.bounds.explain                  # UNUSED?
    15.8  compiler.err.prob.found.req.1                           # Check: DEAD, in unused method
    15.9  compiler.err.proc.bad.config.file                       # JavacProcessingEnvironment
   15.10  compiler.err.proc.cant.access                           # completion failure
    16.1 --- a/test/tools/javac/diags/examples/CantResolve.java	Mon Jan 24 15:44:15 2011 +0000
    16.2 +++ b/test/tools/javac/diags/examples/CantResolve.java	Mon Jan 24 15:44:51 2011 +0000
    16.3 @@ -1,5 +1,5 @@
    16.4  /*
    16.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    16.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    16.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.8   *
    16.9   * This code is free software; you can redistribute it and/or modify it
   16.10 @@ -23,9 +23,8 @@
   16.11  
   16.12  // key: compiler.err.cant.resolve
   16.13  
   16.14 -class CantResolve<T extends Object & java.io.Serializable> {
   16.15 -    T t;
   16.16 -    void m() {
   16.17 -        Object o = t.v;
   16.18 -    }
   16.19 +class CantResolve {
   16.20 +    Object o = new Object() {
   16.21 +        int i = f;
   16.22 +    };
   16.23  }
    17.1 --- a/test/tools/javac/diags/examples/CantResolveArgsParams.java	Mon Jan 24 15:44:15 2011 +0000
    17.2 +++ b/test/tools/javac/diags/examples/CantResolveArgsParams.java	Mon Jan 24 15:44:51 2011 +0000
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
   17.10 @@ -23,9 +23,8 @@
   17.11  
   17.12  // key: compiler.err.cant.resolve.args.params
   17.13  
   17.14 -class CantResolveArgsParams<T extends Object & java.io.Serializable> {
   17.15 -    T t;
   17.16 -    void m() {
   17.17 -        t.<Integer,Double>m2(1, "");
   17.18 -    }
   17.19 +class CantResolveArgsParams {
   17.20 +    Object o = new Object() {
   17.21 +        { this.<Integer,Double>m2(1, ""); }
   17.22 +    };
   17.23  }
    18.1 --- a/test/tools/javac/diags/examples/CantResolveLocation.java	Mon Jan 24 15:44:15 2011 +0000
    18.2 +++ b/test/tools/javac/diags/examples/CantResolveLocation.java	Mon Jan 24 15:44:51 2011 +0000
    18.3 @@ -1,5 +1,5 @@
    18.4  /*
    18.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    18.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    18.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8   *
    18.9   * This code is free software; you can redistribute it and/or modify it
   18.10 @@ -22,6 +22,7 @@
   18.11   */
   18.12  
   18.13  // key: compiler.err.cant.resolve.location
   18.14 +// key: compiler.misc.location
   18.15  
   18.16  class CantResolveLocation {
   18.17      Unknown y;
    19.1 --- a/test/tools/javac/diags/examples/CantResolveLocationArgs.java	Mon Jan 24 15:44:15 2011 +0000
    19.2 +++ b/test/tools/javac/diags/examples/CantResolveLocationArgs.java	Mon Jan 24 15:44:51 2011 +0000
    19.3 @@ -1,5 +1,5 @@
    19.4  /*
    19.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    19.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    19.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.8   *
    19.9   * This code is free software; you can redistribute it and/or modify it
   19.10 @@ -22,6 +22,7 @@
   19.11   */
   19.12  
   19.13  // key: compiler.err.cant.resolve.location.args
   19.14 +// key: compiler.misc.location
   19.15  
   19.16  class X {
   19.17      void m() {
    20.1 --- a/test/tools/javac/diags/examples/CantResolveLocationArgsParams.java	Mon Jan 24 15:44:15 2011 +0000
    20.2 +++ b/test/tools/javac/diags/examples/CantResolveLocationArgsParams.java	Mon Jan 24 15:44:51 2011 +0000
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -22,6 +22,7 @@
   20.11   */
   20.12  
   20.13  // key: compiler.err.cant.resolve.location.args.params
   20.14 +// key: compiler.misc.location
   20.15  
   20.16  import java.util.*;
   20.17  
    21.1 --- a/test/tools/javac/diags/examples/EnumConstRequired.java	Mon Jan 24 15:44:15 2011 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,35 +0,0 @@
    21.4 -/*
    21.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    21.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.7 - *
    21.8 - * This code is free software; you can redistribute it and/or modify it
    21.9 - * under the terms of the GNU General Public License version 2 only, as
   21.10 - * published by the Free Software Foundation.
   21.11 - *
   21.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
   21.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   21.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   21.15 - * version 2 for more details (a copy is included in the LICENSE file that
   21.16 - * accompanied this code).
   21.17 - *
   21.18 - * You should have received a copy of the GNU General Public License version
   21.19 - * 2 along with this work; if not, write to the Free Software Foundation,
   21.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   21.21 - *
   21.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   21.23 - * or visit www.oracle.com if you need additional information or have any
   21.24 - * questions.
   21.25 - */
   21.26 -
   21.27 -// key: compiler.err.enum.const.req
   21.28 -
   21.29 -class EnumConstRequired {
   21.30 -    enum E { A, B, C };
   21.31 -
   21.32 -    void m(E e) {
   21.33 -        switch (e) {
   21.34 -            case e:
   21.35 -                System.err.println("It's me!");
   21.36 -        }
   21.37 -    }
   21.38 -}
    22.1 --- a/test/tools/javac/diags/examples/ForeachNotApplicable.java	Mon Jan 24 15:44:15 2011 +0000
    22.2 +++ b/test/tools/javac/diags/examples/ForeachNotApplicable.java	Mon Jan 24 15:44:51 2011 +0000
    22.3 @@ -1,5 +1,5 @@
    22.4  /*
    22.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    22.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    22.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.8   *
    22.9   * This code is free software; you can redistribute it and/or modify it
   22.10 @@ -22,6 +22,7 @@
   22.11   */
   22.12  
   22.13  // key: compiler.err.foreach.not.applicable.to.type
   22.14 +// key: compiler.misc.type.req.array.or.iterable
   22.15  
   22.16  class ForeachNotApplicable {
   22.17      void m(String arg) {
    23.1 --- a/test/tools/javac/diags/examples/KindnameClass.java	Mon Jan 24 15:44:15 2011 +0000
    23.2 +++ b/test/tools/javac/diags/examples/KindnameClass.java	Mon Jan 24 15:44:51 2011 +0000
    23.3 @@ -1,5 +1,5 @@
    23.4  /*
    23.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    23.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    23.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.8   *
    23.9   * This code is free software; you can redistribute it and/or modify it
   23.10 @@ -23,6 +23,7 @@
   23.11  
   23.12  // key: compiler.misc.kindname.class
   23.13  // key: compiler.err.cant.resolve.location
   23.14 +// key: compiler.misc.location
   23.15  // key: compiler.misc.count.error
   23.16  // run: backdoor
   23.17  
    24.1 --- a/test/tools/javac/diags/examples/KindnameMethod.java	Mon Jan 24 15:44:15 2011 +0000
    24.2 +++ b/test/tools/javac/diags/examples/KindnameMethod.java	Mon Jan 24 15:44:51 2011 +0000
    24.3 @@ -1,5 +1,5 @@
    24.4  /*
    24.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    24.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    24.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.8   *
    24.9   * This code is free software; you can redistribute it and/or modify it
   24.10 @@ -24,6 +24,7 @@
   24.11  // key: compiler.misc.kindname.method
   24.12  // key: compiler.misc.kindname.class
   24.13  // key: compiler.err.cant.resolve.location.args
   24.14 +// key: compiler.misc.location
   24.15  // key: compiler.misc.count.error
   24.16  // run: backdoor
   24.17  
    25.1 --- a/test/tools/javac/diags/examples/KindnameVariable.java	Mon Jan 24 15:44:15 2011 +0000
    25.2 +++ b/test/tools/javac/diags/examples/KindnameVariable.java	Mon Jan 24 15:44:51 2011 +0000
    25.3 @@ -1,5 +1,5 @@
    25.4  /*
    25.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    25.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    25.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.8   *
    25.9   * This code is free software; you can redistribute it and/or modify it
   25.10 @@ -24,6 +24,7 @@
   25.11  // key: compiler.misc.kindname.variable
   25.12  // key: compiler.misc.kindname.class
   25.13  // key: compiler.err.cant.resolve.location
   25.14 +// key: compiler.misc.location
   25.15  // key: compiler.misc.count.error
   25.16  // run: backdoor
   25.17  
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/test/tools/javac/diags/examples/Location.java	Mon Jan 24 15:44:51 2011 +0000
    26.3 @@ -0,0 +1,29 @@
    26.4 +/*
    26.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    26.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    26.7 + *
    26.8 + * This code is free software; you can redistribute it and/or modify it
    26.9 + * under the terms of the GNU General Public License version 2 only, as
   26.10 + * published by the Free Software Foundation.
   26.11 + *
   26.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   26.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   26.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   26.15 + * version 2 for more details (a copy is included in the LICENSE file that
   26.16 + * accompanied this code).
   26.17 + *
   26.18 + * You should have received a copy of the GNU General Public License version
   26.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   26.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   26.21 + *
   26.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   26.23 + * or visit www.oracle.com if you need additional information or have any
   26.24 + * questions.
   26.25 + */
   26.26 +
   26.27 +// key: compiler.err.cant.resolve.location
   26.28 +// key: compiler.misc.location
   26.29 +
   26.30 +class Location {
   26.31 +    { Object o = v; }
   26.32 +}
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/test/tools/javac/diags/examples/Location1.java	Mon Jan 24 15:44:51 2011 +0000
    27.3 @@ -0,0 +1,30 @@
    27.4 +/*
    27.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    27.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    27.7 + *
    27.8 + * This code is free software; you can redistribute it and/or modify it
    27.9 + * under the terms of the GNU General Public License version 2 only, as
   27.10 + * published by the Free Software Foundation.
   27.11 + *
   27.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   27.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   27.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   27.15 + * version 2 for more details (a copy is included in the LICENSE file that
   27.16 + * accompanied this code).
   27.17 + *
   27.18 + * You should have received a copy of the GNU General Public License version
   27.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   27.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   27.21 + *
   27.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   27.23 + * or visit www.oracle.com if you need additional information or have any
   27.24 + * questions.
   27.25 + */
   27.26 +
   27.27 +// key: compiler.err.cant.resolve.location
   27.28 +// key: compiler.misc.location.1
   27.29 +
   27.30 +class Location1 {
   27.31 +    Object o = null;
   27.32 +    { Object o2 = o.v; }
   27.33 +}
    28.1 --- a/test/tools/javac/diags/examples/OperatorCantBeApplied.java	Mon Jan 24 15:44:15 2011 +0000
    28.2 +++ b/test/tools/javac/diags/examples/OperatorCantBeApplied.java	Mon Jan 24 15:44:51 2011 +0000
    28.3 @@ -1,5 +1,5 @@
    28.4  /*
    28.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    28.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    28.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    28.8   *
    28.9   * This code is free software; you can redistribute it and/or modify it
   28.10 @@ -24,5 +24,6 @@
   28.11  // key: compiler.err.operator.cant.be.applied
   28.12  
   28.13  class OperatorCantBeApplied {
   28.14 -    String s = ("a" - "b");
   28.15 +    String s = null;
   28.16 +    { s++; }
   28.17  }
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/test/tools/javac/diags/examples/OperatorCantBeApplied1.java	Mon Jan 24 15:44:51 2011 +0000
    29.3 @@ -0,0 +1,28 @@
    29.4 +/*
    29.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    29.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    29.7 + *
    29.8 + * This code is free software; you can redistribute it and/or modify it
    29.9 + * under the terms of the GNU General Public License version 2 only, as
   29.10 + * published by the Free Software Foundation.
   29.11 + *
   29.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   29.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   29.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   29.15 + * version 2 for more details (a copy is included in the LICENSE file that
   29.16 + * accompanied this code).
   29.17 + *
   29.18 + * You should have received a copy of the GNU General Public License version
   29.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   29.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   29.21 + *
   29.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   29.23 + * or visit www.oracle.com if you need additional information or have any
   29.24 + * questions.
   29.25 + */
   29.26 +
   29.27 +// key: compiler.err.operator.cant.be.applied.1
   29.28 +
   29.29 +class OperatorCantBeApplied1 {
   29.30 +    String s = ("a" - "b");
   29.31 +}
    30.1 --- a/test/tools/javac/diags/examples/StaticImportOnlyClassesAndInterfaces/StaticImportOnlyClassesAndInterfaces.java	Mon Jan 24 15:44:15 2011 +0000
    30.2 +++ b/test/tools/javac/diags/examples/StaticImportOnlyClassesAndInterfaces/StaticImportOnlyClassesAndInterfaces.java	Mon Jan 24 15:44:51 2011 +0000
    30.3 @@ -1,5 +1,5 @@
    30.4  /*
    30.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    30.6 + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    30.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    30.8   *
    30.9   * This code is free software; you can redistribute it and/or modify it
   30.10 @@ -23,6 +23,7 @@
   30.11  
   30.12  // key: compiler.err.static.imp.only.classes.and.interfaces
   30.13  // key: compiler.err.cant.resolve.location
   30.14 +// key: compiler.misc.location
   30.15  
   30.16  import static p.Other.array.length;
   30.17  
    31.1 --- a/test/tools/javac/failover/FailOver01.out	Mon Jan 24 15:44:15 2011 +0000
    31.2 +++ b/test/tools/javac/failover/FailOver01.out	Mon Jan 24 15:44:51 2011 +0000
    31.3 @@ -1,3 +1,3 @@
    31.4  FailOver01.java:10:22: compiler.err.expected: ';'
    31.5 -FailOver01.java:10:16: compiler.err.cant.resolve.location: kindname.variable, x, , , kindname.class, Test
    31.6 +FailOver01.java:10:16: compiler.err.cant.resolve.location: kindname.variable, x, , , (compiler.misc.location: kindname.class, Test, null)
    31.7  2 errors
    32.1 --- a/test/tools/javac/failover/FailOver02.out	Mon Jan 24 15:44:15 2011 +0000
    32.2 +++ b/test/tools/javac/failover/FailOver02.out	Mon Jan 24 15:44:51 2011 +0000
    32.3 @@ -1,3 +1,3 @@
    32.4  FailOver02.java:10:1: compiler.err.does.not.override.abstract: Test, close(), java.lang.AutoCloseable
    32.5 -FailOver02.java:12:9: compiler.err.cant.resolve.location.args: kindname.method, close, , , kindname.class, Test
    32.6 +FailOver02.java:12:9: compiler.err.cant.resolve.location.args: kindname.method, close, , , (compiler.misc.location: kindname.class, Test, null)
    32.7  2 errors
    33.1 --- a/test/tools/javac/failover/FailOver04.out	Mon Jan 24 15:44:15 2011 +0000
    33.2 +++ b/test/tools/javac/failover/FailOver04.out	Mon Jan 24 15:44:51 2011 +0000
    33.3 @@ -1,2 +1,2 @@
    33.4 -FailOver04.java:11:10: compiler.err.cant.resolve.location: kindname.class, Unknown, , , kindname.class, Test
    33.5 +FailOver04.java:11:10: compiler.err.cant.resolve.location: kindname.class, Unknown, , , (compiler.misc.location: kindname.class, Test, null)
    33.6  1 error
    34.1 --- a/test/tools/javac/generics/6711619/T6711619a.out	Mon Jan 24 15:44:15 2011 +0000
    34.2 +++ b/test/tools/javac/generics/6711619/T6711619a.out	Mon Jan 24 15:44:51 2011 +0000
    34.3 @@ -1,5 +1,5 @@
    34.4 -T6711619a.java:40:14: compiler.err.cant.resolve.args: kindname.method, a, , 
    34.5 -T6711619a.java:41:14: compiler.err.cant.resolve.args: kindname.method, b, , 
    34.6 +T6711619a.java:40:14: compiler.err.cant.resolve.location.args: kindname.method, a, , , (compiler.misc.location.1: kindname.variable, t, T)
    34.7 +T6711619a.java:41:14: compiler.err.cant.resolve.location.args: kindname.method, b, , , (compiler.misc.location.1: kindname.variable, t, T)
    34.8  T6711619a.java:46:19: compiler.err.report.access: a, private, T6711619a.A
    34.9  T6711619a.java:47:19: compiler.err.report.access: b, private, T6711619a.B
   34.10  T6711619a.java:48:19: compiler.err.report.access: a, private, T6711619a.A
    35.1 --- a/test/tools/javac/generics/diamond/neg/Neg01.out	Mon Jan 24 15:44:15 2011 +0000
    35.2 +++ b/test/tools/javac/generics/diamond/neg/Neg01.out	Mon Jan 24 15:44:51 2011 +0000
    35.3 @@ -1,29 +1,29 @@
    35.4 -Neg01.java:18:15: compiler.err.not.within.bounds: java.lang.String
    35.5 +Neg01.java:18:15: compiler.err.not.within.bounds: java.lang.String, X
    35.6  Neg01.java:18:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
    35.7 -Neg01.java:19:15: compiler.err.not.within.bounds: ? extends java.lang.String
    35.8 +Neg01.java:19:15: compiler.err.not.within.bounds: ? extends java.lang.String, X
    35.9  Neg01.java:19:38: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.10  Neg01.java:20:23: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.11 -Neg01.java:21:15: compiler.err.not.within.bounds: ? super java.lang.String
   35.12 +Neg01.java:21:15: compiler.err.not.within.bounds: ? super java.lang.String, X
   35.13  Neg01.java:21:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.14 -Neg01.java:23:15: compiler.err.not.within.bounds: java.lang.String
   35.15 +Neg01.java:23:15: compiler.err.not.within.bounds: java.lang.String, X
   35.16  Neg01.java:23:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.17 -Neg01.java:24:15: compiler.err.not.within.bounds: ? extends java.lang.String
   35.18 +Neg01.java:24:15: compiler.err.not.within.bounds: ? extends java.lang.String, X
   35.19  Neg01.java:24:38: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.20  Neg01.java:25:23: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.21 -Neg01.java:26:15: compiler.err.not.within.bounds: ? super java.lang.String
   35.22 +Neg01.java:26:15: compiler.err.not.within.bounds: ? super java.lang.String, X
   35.23  Neg01.java:26:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.24 -Neg01.java:28:15: compiler.err.not.within.bounds: java.lang.String
   35.25 +Neg01.java:28:15: compiler.err.not.within.bounds: java.lang.String, X
   35.26  Neg01.java:28:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.27 -Neg01.java:29:15: compiler.err.not.within.bounds: ? extends java.lang.String
   35.28 +Neg01.java:29:15: compiler.err.not.within.bounds: ? extends java.lang.String, X
   35.29  Neg01.java:29:39: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.30  Neg01.java:30:24: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.31 -Neg01.java:31:9: compiler.err.cant.resolve.location: kindname.class, Foo, , , kindname.class, Neg01<X>
   35.32 +Neg01.java:31:9: compiler.err.cant.resolve.location: kindname.class, Foo, , , (compiler.misc.location: kindname.class, Neg01, null)
   35.33  Neg01.java:31:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.34 -Neg01.java:33:15: compiler.err.not.within.bounds: java.lang.String
   35.35 +Neg01.java:33:15: compiler.err.not.within.bounds: java.lang.String, X
   35.36  Neg01.java:33:29: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.37 -Neg01.java:34:15: compiler.err.not.within.bounds: ? extends java.lang.String
   35.38 +Neg01.java:34:15: compiler.err.not.within.bounds: ? extends java.lang.String, X
   35.39  Neg01.java:34:39: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.40  Neg01.java:35:24: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.41 -Neg01.java:36:15: compiler.err.not.within.bounds: ? super java.lang.String
   35.42 +Neg01.java:36:15: compiler.err.not.within.bounds: ? super java.lang.String, X
   35.43  Neg01.java:36:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg01), null
   35.44  28 errors
    36.1 --- a/test/tools/javac/generics/diamond/neg/Neg02.out	Mon Jan 24 15:44:15 2011 +0000
    36.2 +++ b/test/tools/javac/generics/diamond/neg/Neg02.out	Mon Jan 24 15:44:51 2011 +0000
    36.3 @@ -1,57 +1,57 @@
    36.4 -Neg02.java:19:13: compiler.err.not.within.bounds: java.lang.String
    36.5 +Neg02.java:19:13: compiler.err.not.within.bounds: java.lang.String, X
    36.6  Neg02.java:19:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
    36.7 -Neg02.java:20:13: compiler.err.not.within.bounds: ? extends java.lang.String
    36.8 +Neg02.java:20:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
    36.9  Neg02.java:20:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.10  Neg02.java:21:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.11 -Neg02.java:22:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.12 +Neg02.java:22:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.13  Neg02.java:22:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.14 -Neg02.java:24:13: compiler.err.not.within.bounds: java.lang.String
   36.15 +Neg02.java:24:13: compiler.err.not.within.bounds: java.lang.String, X
   36.16  Neg02.java:24:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.17 -Neg02.java:25:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.18 +Neg02.java:25:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.19  Neg02.java:25:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.20  Neg02.java:26:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.21 -Neg02.java:27:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.22 +Neg02.java:27:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.23  Neg02.java:27:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.24 -Neg02.java:29:13: compiler.err.not.within.bounds: java.lang.String
   36.25 +Neg02.java:29:13: compiler.err.not.within.bounds: java.lang.String, X
   36.26  Neg02.java:29:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.27 -Neg02.java:30:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.28 +Neg02.java:30:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.29  Neg02.java:30:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.30  Neg02.java:31:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.31 -Neg02.java:32:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.32 +Neg02.java:32:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.33  Neg02.java:32:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.34 -Neg02.java:34:13: compiler.err.not.within.bounds: java.lang.String
   36.35 +Neg02.java:34:13: compiler.err.not.within.bounds: java.lang.String, X
   36.36  Neg02.java:34:27: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.37 -Neg02.java:35:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.38 +Neg02.java:35:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.39  Neg02.java:35:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.40  Neg02.java:36:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.41 -Neg02.java:37:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.42 +Neg02.java:37:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.43  Neg02.java:37:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.44 -Neg02.java:41:13: compiler.err.not.within.bounds: java.lang.String
   36.45 +Neg02.java:41:13: compiler.err.not.within.bounds: java.lang.String, X
   36.46  Neg02.java:41:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.47 -Neg02.java:42:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.48 +Neg02.java:42:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.49  Neg02.java:42:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.50  Neg02.java:43:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.51 -Neg02.java:44:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.52 +Neg02.java:44:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.53  Neg02.java:44:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.54 -Neg02.java:46:13: compiler.err.not.within.bounds: java.lang.String
   36.55 +Neg02.java:46:13: compiler.err.not.within.bounds: java.lang.String, X
   36.56  Neg02.java:46:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.57 -Neg02.java:47:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.58 +Neg02.java:47:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.59  Neg02.java:47:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.60  Neg02.java:48:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.61 -Neg02.java:49:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.62 +Neg02.java:49:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.63  Neg02.java:49:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.64 -Neg02.java:51:13: compiler.err.not.within.bounds: java.lang.String
   36.65 +Neg02.java:51:13: compiler.err.not.within.bounds: java.lang.String, X
   36.66  Neg02.java:51:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.67 -Neg02.java:52:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.68 +Neg02.java:52:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.69  Neg02.java:52:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.70  Neg02.java:53:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.71 -Neg02.java:54:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.72 +Neg02.java:54:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.73  Neg02.java:54:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.74 -Neg02.java:56:13: compiler.err.not.within.bounds: java.lang.String
   36.75 +Neg02.java:56:13: compiler.err.not.within.bounds: java.lang.String, X
   36.76  Neg02.java:56:27: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.77 -Neg02.java:57:13: compiler.err.not.within.bounds: ? extends java.lang.String
   36.78 +Neg02.java:57:13: compiler.err.not.within.bounds: ? extends java.lang.String, X
   36.79  Neg02.java:57:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.80  Neg02.java:58:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.81 -Neg02.java:59:13: compiler.err.not.within.bounds: ? super java.lang.String
   36.82 +Neg02.java:59:13: compiler.err.not.within.bounds: ? super java.lang.String, X
   36.83  Neg02.java:59:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg02.Foo), null
   36.84  56 errors
    37.1 --- a/test/tools/javac/generics/diamond/neg/Neg03.out	Mon Jan 24 15:44:15 2011 +0000
    37.2 +++ b/test/tools/javac/generics/diamond/neg/Neg03.out	Mon Jan 24 15:44:51 2011 +0000
    37.3 @@ -1,85 +1,85 @@
    37.4 -Neg03.java:19:13: compiler.err.not.within.bounds: java.lang.String
    37.5 +Neg03.java:19:13: compiler.err.not.within.bounds: java.lang.String, V
    37.6  Neg03.java:19:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
    37.7 -Neg03.java:20:13: compiler.err.not.within.bounds: ? extends java.lang.String
    37.8 +Neg03.java:20:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
    37.9  Neg03.java:20:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.10  Neg03.java:21:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.11 -Neg03.java:22:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.12 +Neg03.java:22:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.13  Neg03.java:22:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.14 -Neg03.java:24:13: compiler.err.not.within.bounds: java.lang.String
   37.15 +Neg03.java:24:13: compiler.err.not.within.bounds: java.lang.String, V
   37.16  Neg03.java:24:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.17 -Neg03.java:25:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.18 +Neg03.java:25:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.19  Neg03.java:25:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.20  Neg03.java:26:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.21 -Neg03.java:27:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.22 +Neg03.java:27:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.23  Neg03.java:27:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.24 -Neg03.java:29:13: compiler.err.not.within.bounds: java.lang.String
   37.25 +Neg03.java:29:13: compiler.err.not.within.bounds: java.lang.String, V
   37.26  Neg03.java:29:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.27 -Neg03.java:30:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.28 +Neg03.java:30:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.29  Neg03.java:30:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.30  Neg03.java:31:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.31 -Neg03.java:32:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.32 +Neg03.java:32:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.33  Neg03.java:32:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.34 -Neg03.java:34:13: compiler.err.not.within.bounds: java.lang.String
   37.35 +Neg03.java:34:13: compiler.err.not.within.bounds: java.lang.String, V
   37.36  Neg03.java:34:27: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.37 -Neg03.java:35:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.38 +Neg03.java:35:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.39  Neg03.java:35:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.40  Neg03.java:36:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.41 -Neg03.java:37:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.42 +Neg03.java:37:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.43  Neg03.java:37:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.44 -Neg03.java:41:13: compiler.err.not.within.bounds: java.lang.String
   37.45 +Neg03.java:41:13: compiler.err.not.within.bounds: java.lang.String, V
   37.46  Neg03.java:41:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.47 -Neg03.java:42:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.48 +Neg03.java:42:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.49  Neg03.java:42:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.50  Neg03.java:43:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.51 -Neg03.java:44:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.52 +Neg03.java:44:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.53  Neg03.java:44:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.54 -Neg03.java:46:13: compiler.err.not.within.bounds: java.lang.String
   37.55 +Neg03.java:46:13: compiler.err.not.within.bounds: java.lang.String, V
   37.56  Neg03.java:46:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.57 -Neg03.java:47:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.58 +Neg03.java:47:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.59  Neg03.java:47:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.60  Neg03.java:48:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.61 -Neg03.java:49:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.62 +Neg03.java:49:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.63  Neg03.java:49:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.64 -Neg03.java:51:13: compiler.err.not.within.bounds: java.lang.String
   37.65 +Neg03.java:51:13: compiler.err.not.within.bounds: java.lang.String, V
   37.66  Neg03.java:51:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.67 -Neg03.java:52:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.68 +Neg03.java:52:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.69  Neg03.java:52:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.70  Neg03.java:53:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.71 -Neg03.java:54:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.72 +Neg03.java:54:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.73  Neg03.java:54:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.74 -Neg03.java:56:13: compiler.err.not.within.bounds: java.lang.String
   37.75 +Neg03.java:56:13: compiler.err.not.within.bounds: java.lang.String, V
   37.76  Neg03.java:56:27: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.77 -Neg03.java:57:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.78 +Neg03.java:57:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.79  Neg03.java:57:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.80  Neg03.java:58:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.81 -Neg03.java:59:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.82 +Neg03.java:59:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.83  Neg03.java:59:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.84 -Neg03.java:63:13: compiler.err.not.within.bounds: java.lang.String
   37.85 +Neg03.java:63:13: compiler.err.not.within.bounds: java.lang.String, V
   37.86  Neg03.java:63:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.87 -Neg03.java:64:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.88 +Neg03.java:64:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.89  Neg03.java:64:38: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.90  Neg03.java:65:23: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.91 -Neg03.java:66:13: compiler.err.not.within.bounds: ? super java.lang.String
   37.92 +Neg03.java:66:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   37.93  Neg03.java:66:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.94 -Neg03.java:68:13: compiler.err.not.within.bounds: java.lang.String
   37.95 +Neg03.java:68:13: compiler.err.not.within.bounds: java.lang.String, V
   37.96  Neg03.java:68:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
   37.97 -Neg03.java:69:13: compiler.err.not.within.bounds: ? extends java.lang.String
   37.98 +Neg03.java:69:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   37.99  Neg03.java:69:38: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.100  Neg03.java:70:23: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.101 -Neg03.java:71:13: compiler.err.not.within.bounds: ? super java.lang.String
  37.102 +Neg03.java:71:13: compiler.err.not.within.bounds: ? super java.lang.String, V
  37.103  Neg03.java:71:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.104 -Neg03.java:73:13: compiler.err.not.within.bounds: java.lang.String
  37.105 +Neg03.java:73:13: compiler.err.not.within.bounds: java.lang.String, V
  37.106  Neg03.java:73:28: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.107 -Neg03.java:74:13: compiler.err.not.within.bounds: ? extends java.lang.String
  37.108 +Neg03.java:74:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
  37.109  Neg03.java:74:39: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.110  Neg03.java:75:24: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.111 -Neg03.java:76:13: compiler.err.not.within.bounds: ? super java.lang.String
  37.112 +Neg03.java:76:13: compiler.err.not.within.bounds: ? super java.lang.String, V
  37.113  Neg03.java:76:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.114 -Neg03.java:78:13: compiler.err.not.within.bounds: java.lang.String
  37.115 +Neg03.java:78:13: compiler.err.not.within.bounds: java.lang.String, V
  37.116  Neg03.java:78:29: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.117 -Neg03.java:79:13: compiler.err.not.within.bounds: ? extends java.lang.String
  37.118 +Neg03.java:79:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
  37.119  Neg03.java:79:39: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.120  Neg03.java:80:24: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.121 -Neg03.java:81:13: compiler.err.not.within.bounds: ? super java.lang.String
  37.122 +Neg03.java:81:13: compiler.err.not.within.bounds: ? super java.lang.String, V
  37.123  Neg03.java:81:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Neg03.Foo), null
  37.124  84 errors
    38.1 --- a/test/tools/javac/generics/diamond/neg/Neg04.out	Mon Jan 24 15:44:15 2011 +0000
    38.2 +++ b/test/tools/javac/generics/diamond/neg/Neg04.out	Mon Jan 24 15:44:51 2011 +0000
    38.3 @@ -1,29 +1,29 @@
    38.4 -Neg04.java:18:13: compiler.err.not.within.bounds: java.lang.String
    38.5 +Neg04.java:18:13: compiler.err.not.within.bounds: java.lang.String, V
    38.6  Neg04.java:18:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
    38.7 -Neg04.java:19:13: compiler.err.not.within.bounds: ? extends java.lang.String
    38.8 +Neg04.java:19:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
    38.9  Neg04.java:19:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.10  Neg04.java:20:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.11 -Neg04.java:21:13: compiler.err.not.within.bounds: ? super java.lang.String
   38.12 +Neg04.java:21:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   38.13  Neg04.java:21:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.14 -Neg04.java:23:13: compiler.err.not.within.bounds: java.lang.String
   38.15 +Neg04.java:23:13: compiler.err.not.within.bounds: java.lang.String, V
   38.16  Neg04.java:23:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.17 -Neg04.java:24:13: compiler.err.not.within.bounds: ? extends java.lang.String
   38.18 +Neg04.java:24:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   38.19  Neg04.java:24:36: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.20  Neg04.java:25:21: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.21 -Neg04.java:26:13: compiler.err.not.within.bounds: ? super java.lang.String
   38.22 +Neg04.java:26:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   38.23  Neg04.java:26:34: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.24 -Neg04.java:28:13: compiler.err.not.within.bounds: java.lang.String
   38.25 +Neg04.java:28:13: compiler.err.not.within.bounds: java.lang.String, V
   38.26  Neg04.java:28:26: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.27 -Neg04.java:29:13: compiler.err.not.within.bounds: ? extends java.lang.String
   38.28 +Neg04.java:29:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   38.29  Neg04.java:29:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.30  Neg04.java:30:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.31 -Neg04.java:31:13: compiler.err.not.within.bounds: ? super java.lang.String
   38.32 +Neg04.java:31:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   38.33  Neg04.java:31:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.34 -Neg04.java:33:13: compiler.err.not.within.bounds: java.lang.String
   38.35 +Neg04.java:33:13: compiler.err.not.within.bounds: java.lang.String, V
   38.36  Neg04.java:33:27: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.37 -Neg04.java:34:13: compiler.err.not.within.bounds: ? extends java.lang.String
   38.38 +Neg04.java:34:13: compiler.err.not.within.bounds: ? extends java.lang.String, V
   38.39  Neg04.java:34:37: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.40  Neg04.java:35:22: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.41 -Neg04.java:36:13: compiler.err.not.within.bounds: ? super java.lang.String
   38.42 +Neg04.java:36:13: compiler.err.not.within.bounds: ? super java.lang.String, V
   38.43  Neg04.java:36:35: compiler.err.cant.apply.diamond: (compiler.misc.diamond: Foo), null
   38.44  28 errors
    39.1 --- a/test/tools/javac/generics/diamond/neg/Neg11.out	Mon Jan 24 15:44:15 2011 +0000
    39.2 +++ b/test/tools/javac/generics/diamond/neg/Neg11.out	Mon Jan 24 15:44:51 2011 +0000
    39.3 @@ -1,3 +1,3 @@
    39.4 -Neg11.java:15:25: compiler.err.cant.resolve.location: kindname.class, UndeclaredName, , , kindname.class, Neg11
    39.5 -Neg11.java:16:25: compiler.err.cant.resolve.location: kindname.class, UndeclaredName, , , kindname.class, Neg11
    39.6 +Neg11.java:15:25: compiler.err.cant.resolve.location: kindname.class, UndeclaredName, , , (compiler.misc.location: kindname.class, Neg11, null)
    39.7 +Neg11.java:16:25: compiler.err.cant.resolve.location: kindname.class, UndeclaredName, , , (compiler.misc.location: kindname.class, Neg11, null)
    39.8  2 errors
    40.1 --- a/test/tools/javac/generics/inference/6943278/T6943278.out	Mon Jan 24 15:44:15 2011 +0000
    40.2 +++ b/test/tools/javac/generics/inference/6943278/T6943278.out	Mon Jan 24 15:44:51 2011 +0000
    40.3 @@ -1,3 +1,3 @@
    40.4  T6943278.java:7:35: compiler.err.cant.resolve: kindname.class, NonExistentInterface, , 
    40.5 -T6943278.java:9:25: compiler.err.cant.resolve.location: kindname.class, NonExistentInterface, , , kindname.class, T6943278<X>
    40.6 +T6943278.java:9:25: compiler.err.cant.resolve.location: kindname.class, NonExistentInterface, , , (compiler.misc.location: kindname.class, T6943278, null)
    40.7  2 errors
    41.1 --- a/test/tools/javac/generics/typevars/5060485/Compatibility.out	Mon Jan 24 15:44:15 2011 +0000
    41.2 +++ b/test/tools/javac/generics/typevars/5060485/Compatibility.out	Mon Jan 24 15:44:51 2011 +0000
    41.3 @@ -1,2 +1,2 @@
    41.4 -Compatibility.java:36:35: compiler.err.not.within.bounds: Test.Y
    41.5 +Compatibility.java:36:35: compiler.err.not.within.bounds: Test.Y, T
    41.6  1 error
    42.1 --- a/test/tools/javac/generics/typevars/5060485/Compatibility02.out	Mon Jan 24 15:44:15 2011 +0000
    42.2 +++ b/test/tools/javac/generics/typevars/5060485/Compatibility02.out	Mon Jan 24 15:44:51 2011 +0000
    42.3 @@ -1,2 +1,2 @@
    42.4 -Compatibility.java:36:35: compiler.err.not.within.bounds: Test.Y
    42.5 +Compatibility.java:36:35: compiler.err.not.within.bounds: Test.Y, T
    42.6  1 error
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/test/tools/javac/generics/typevars/6968793/T6968793.java	Mon Jan 24 15:44:51 2011 +0000
    43.3 @@ -0,0 +1,11 @@
    43.4 +/*
    43.5 + * @test /nodynamiccopyright/
    43.6 + * @bug     6968793
    43.7 + * @summary javac generates spourious diagnostics for ill-formed type-variable bounds
    43.8 + * @author  mcimadamore
    43.9 + * @compile/fail/ref=T6968793.out -XDrawDiagnostics T6968793.java
   43.10 + */
   43.11 +
   43.12 +class T6968793<X extends Number, Y extends X, Z extends Object & Comparable<Y>> {
   43.13 +    T6968793<Object, Object, Object> o;
   43.14 +}
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/test/tools/javac/generics/typevars/6968793/T6968793.out	Mon Jan 24 15:44:51 2011 +0000
    44.3 @@ -0,0 +1,4 @@
    44.4 +T6968793.java:10:14: compiler.err.not.within.bounds: java.lang.Object, X
    44.5 +T6968793.java:10:22: compiler.err.not.within.bounds: java.lang.Object, Y
    44.6 +T6968793.java:10:30: compiler.err.not.within.bounds: java.lang.Object, Z
    44.7 +3 errors
    45.1 --- a/test/tools/javac/policy/test1/byfile.ABD.out	Mon Jan 24 15:44:15 2011 +0000
    45.2 +++ b/test/tools/javac/policy/test1/byfile.ABD.out	Mon Jan 24 15:44:51 2011 +0000
    45.3 @@ -12,6 +12,6 @@
    45.4  [generate code A2]
    45.5  [attribute B]
    45.6  [attribute B1]
    45.7 -B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , kindname.class, B1
    45.8 +B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , (compiler.misc.location: kindname.class, B1, null)
    45.9  [attribute B2]
   45.10  1 error
    46.1 --- a/test/tools/javac/policy/test1/bytodo.ABD.out	Mon Jan 24 15:44:15 2011 +0000
    46.2 +++ b/test/tools/javac/policy/test1/bytodo.ABD.out	Mon Jan 24 15:44:51 2011 +0000
    46.3 @@ -15,7 +15,7 @@
    46.4  [desugar B]
    46.5  [generate code B]
    46.6  [attribute B1]
    46.7 -B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , kindname.class, B1
    46.8 +B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , (compiler.misc.location: kindname.class, B1, null)
    46.9  [attribute B2]
   46.10  [attribute D]
   46.11  [attribute D1]
    47.1 --- a/test/tools/javac/policy/test1/simple.ABD.out	Mon Jan 24 15:44:15 2011 +0000
    47.2 +++ b/test/tools/javac/policy/test1/simple.ABD.out	Mon Jan 24 15:44:51 2011 +0000
    47.3 @@ -3,7 +3,7 @@
    47.4  [attribute A2]
    47.5  [attribute B]
    47.6  [attribute B1]
    47.7 -B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , kindname.class, B1
    47.8 +B.java:12:9: compiler.err.cant.resolve.location: kindname.variable, x, , , (compiler.misc.location: kindname.class, B1, null)
    47.9  [attribute B2]
   47.10  [attribute D]
   47.11  [attribute D1]

mercurial