boolean (@NotNull HierarchicalMethodSignature thisSig, @NotNull HierarchicalMethodSignature thatSig) { PsiType thisRet = thisSig.getSubstitutor().substitute(thisSig.getMethod().getReturnType()); PsiType thatRet = thatSig.getSubstitutor().substitute(thatSig.getMethod().getReturnType()); PsiSubstitutor unifyingSubstitutor = MethodSignatureUtil.isSubsignature(thatSig, thisSig) ? MethodSignatureUtil.getSuperMethodSignatureSubstitutor(thisSig, thatSig) : null; if (unifyingSubstitutor != null) { thisRet = unifyingSubstitutor.substitute(thisRet); thatRet = unifyingSubstitutor.substitute(thatRet); } if (thatRet == null || thisRet == null) { return false; } if (!thatRet.isValid()) { PsiUtilCore.ensureValid(thatSig.getMethod()); PsiUtil.ensureValidType(thatRet); } if (!thisRet.isValid()) { PsiUtilCore.ensureValid(thisSig.getMethod()); PsiUtil.ensureValidType(thisRet); } return !thatRet.equals(thisRet) && TypeConversionUtil.isAssignable(thatRet, thisRet, false); }