616 */ |
616 */ |
617 private boolean checkExtends(Type a, Type bound) { |
617 private boolean checkExtends(Type a, Type bound) { |
618 if (a.isUnbound()) { |
618 if (a.isUnbound()) { |
619 return true; |
619 return true; |
620 } else if (!a.hasTag(WILDCARD)) { |
620 } else if (!a.hasTag(WILDCARD)) { |
621 a = types.upperBound(a); |
621 a = types.cvarUpperBound(a); |
622 return types.isSubtype(a, bound); |
622 return types.isSubtype(a, bound); |
623 } else if (a.isExtendsBound()) { |
623 } else if (a.isExtendsBound()) { |
624 return types.isCastable(bound, types.upperBound(a), types.noWarnings); |
624 return types.isCastable(bound, types.wildUpperBound(a), types.noWarnings); |
625 } else if (a.isSuperBound()) { |
625 } else if (a.isSuperBound()) { |
626 return !types.notSoftSubtype(types.wildLowerBound(a), bound); |
626 return !types.notSoftSubtype(types.wildLowerBound(a), bound); |
627 } |
627 } |
628 return true; |
628 return true; |
629 } |
629 } |