equal
deleted
inserted
replaced
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 |