Skip to content

Commit

Permalink
Add comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
smillst committed Jan 14, 2022
1 parent 63f1816 commit 6cd34fe
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,12 @@ protected Void visitParameterizedType(AnnotatedDeclaredType type, ParameterizedT
capturedTypeVar.getUpperBound());
}
} else if (AnnotatedTypes.isExplicitlySuperBounded(wildcard)) {
// If the super bound of the wildcard is the same as the upper bound of the type
// parameter, then javac uses the bound rather than creating a fresh type variable.
// In this case, the Checker Framework uses the annotations on the super bound of the
// wildcard and ignores the annotations on the extends bound. So, issue a warning if
// the annotations on the extends bound are not the same as the annotations on the super
// bound.
if (!(atypeFactory
.getQualifierHierarchy()
.isSubtype(
Expand Down

0 comments on commit 6cd34fe

Please sign in to comment.