src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 2400
0e026d3f2786
parent 2390
b06c2db45ddb
child 2419
e6d1e9f29132
equal deleted inserted replaced
2399:f4254623c54e 2400:0e026d3f2786
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 }

mercurial