1.1 --- a/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Tue Apr 10 23:19:26 2012 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Wed Apr 11 10:50:11 2012 +0100 1.3 @@ -540,13 +540,22 @@ 1.4 bounds.head.tag == NONE || 1.5 bounds.head.tag == ERROR; 1.6 1.7 - 1.8 - JCDiagnostic d = diags.fragment("where.typevar" + 1.9 + if ((t.tsym.flags() & SYNTHETIC) == 0) { 1.10 + //this is a true typevar 1.11 + JCDiagnostic d = diags.fragment("where.typevar" + 1.12 (boundErroneous ? ".1" : ""), t, bounds, 1.13 Kinds.kindName(t.tsym.location()), t.tsym.location()); 1.14 - whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); 1.15 - symbolPreprocessor.visit(t.tsym.location(), null); 1.16 - visit(bounds); 1.17 + whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); 1.18 + symbolPreprocessor.visit(t.tsym.location(), null); 1.19 + visit(bounds); 1.20 + } else { 1.21 + Assert.check(!boundErroneous); 1.22 + //this is a fresh (synthetic) tvar 1.23 + JCDiagnostic d = diags.fragment("where.fresh.typevar", t, bounds); 1.24 + whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); 1.25 + visit(bounds); 1.26 + } 1.27 + 1.28 } 1.29 return null; 1.30 }