src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java

changeset 343
dd5c51734ad9
parent 342
b1e027181dd4
child 554
9d9f26857129
equal deleted inserted replaced
342:b1e027181dd4 343:dd5c51734ad9
522 } 522 }
523 523
524 @Override 524 @Override
525 public Void visitTypeVar(TypeVar t, Void ignored) { 525 public Void visitTypeVar(TypeVar t, Void ignored) {
526 if (indexOf(t, WhereClauseKind.TYPEVAR) == -1) { 526 if (indexOf(t, WhereClauseKind.TYPEVAR) == -1) {
527 //access the bound type and skip error types
527 Type bound = t.bound; 528 Type bound = t.bound;
528 while ((bound instanceof ErrorType)) 529 while ((bound instanceof ErrorType))
529 bound = ((ErrorType)bound).getOriginalType(); 530 bound = ((ErrorType)bound).getOriginalType();
530 List<Type> bounds = types.getBounds(t); 531 //retrieve the bound list - if the type variable
532 //has not been attributed the bound is not set
533 List<Type> bounds = bound != null ?
534 types.getBounds(t) :
535 List.<Type>nil();
536
531 nameSimplifier.addUsage(t.tsym); 537 nameSimplifier.addUsage(t.tsym);
532 538
533 boolean boundErroneous = bounds.head == null || 539 boolean boundErroneous = bounds.head == null ||
534 bounds.head.tag == NONE || 540 bounds.head.tag == NONE ||
535 bounds.head.tag == ERROR; 541 bounds.head.tag == ERROR;

mercurial