langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
changeset 1868 391ba14d071e
parent 1531 37df4e42719a
child 1874 891c2d6823bb
equal deleted inserted replaced
1867:0a3af3ae0d8e 1868:391ba14d071e
  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.returnTypeSubstitutable(mt, ot, otres, overrideWarner);
  1166             types.covariantReturnType(mtres, 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