538 |
538 |
539 boolean boundErroneous = bounds.head == null || |
539 boolean boundErroneous = bounds.head == null || |
540 bounds.head.tag == NONE || |
540 bounds.head.tag == NONE || |
541 bounds.head.tag == ERROR; |
541 bounds.head.tag == ERROR; |
542 |
542 |
543 |
543 if ((t.tsym.flags() & SYNTHETIC) == 0) { |
544 JCDiagnostic d = diags.fragment("where.typevar" + |
544 //this is a true typevar |
|
545 JCDiagnostic d = diags.fragment("where.typevar" + |
545 (boundErroneous ? ".1" : ""), t, bounds, |
546 (boundErroneous ? ".1" : ""), t, bounds, |
546 Kinds.kindName(t.tsym.location()), t.tsym.location()); |
547 Kinds.kindName(t.tsym.location()), t.tsym.location()); |
547 whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); |
548 whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); |
548 symbolPreprocessor.visit(t.tsym.location(), null); |
549 symbolPreprocessor.visit(t.tsym.location(), null); |
549 visit(bounds); |
550 visit(bounds); |
|
551 } else { |
|
552 Assert.check(!boundErroneous); |
|
553 //this is a fresh (synthetic) tvar |
|
554 JCDiagnostic d = diags.fragment("where.fresh.typevar", t, bounds); |
|
555 whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d); |
|
556 visit(bounds); |
|
557 } |
|
558 |
550 } |
559 } |
551 return null; |
560 return null; |
552 } |
561 } |
553 }; |
562 }; |
554 // </editor-fold> |
563 // </editor-fold> |