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; |