Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TypeParameterUnusedInFormals: Replace .bound by .getUpperBound()
  • Loading branch information
don-vip committed Feb 11, 2019
commit 1dcdb098e883855e84ae712c39841a47c5e96f21
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Description matchMethod(MethodTree tree, VisitorState state) {

// Ignore f-bounds.
// e.g.: <T extends Enum<T>> T unsafeEnumDeserializer();
if (retType.bound != null && TypeParameterFinder.visit(retType.bound).contains(retType.tsym)) {
if (retType.getUpperBound() != null && TypeParameterFinder.visit(retType.getUpperBound()).contains(retType.tsym)) {
return Description.NO_MATCH;
}

Expand Down Expand Up @@ -141,8 +141,8 @@ public Void visitTypeVar(Type.TypeVar type, Void unused) {
if (!seen.add(type.tsym)) {
return null;
}
if (type.bound != null) {
type.bound.accept(this, null);
if (type.getUpperBound() != null) {
type.getUpperBound().accept(this, null);
}
return null;
}
Expand Down