langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
changeset 1874 891c2d6823bb
parent 1868 391ba14d071e
child 2219 03b1b17c4b2e
child 2212 1d3dc0e0ba0c
equal deleted inserted replaced
1873:658385834998 1874:891c2d6823bb
  1161         Type mtres = mt.getReturnType();
  1161         Type mtres = mt.getReturnType();
  1162         Type otres = types.subst(ot.getReturnType(), otvars, mtvars);
  1162         Type otres = types.subst(ot.getReturnType(), otvars, mtvars);
  1163 
  1163 
  1164         overrideWarner.warned = false;
  1164         overrideWarner.warned = false;
  1165         boolean resultTypesOK =
  1165         boolean resultTypesOK =
  1166             types.covariantReturnType(mtres, otres, overrideWarner);
  1166             types.returnTypeSubstitutable(mt, ot, otres, overrideWarner);
  1167         if (!resultTypesOK) {
  1167         if (!resultTypesOK) {
  1168             if (!source.allowCovariantReturns() &&
  1168             if (!source.allowCovariantReturns() &&
  1169                 m.owner != origin &&
  1169                 m.owner != origin &&
  1170                 m.owner.isSubClass(other.owner, types)) {
  1170                 m.owner.isSubClass(other.owner, types)) {
  1171                 // allow limited interoperability with covariant returns
  1171                 // allow limited interoperability with covariant returns