DfaMemoryStateImpl#shouldCompareByEquals: do not perform redundant conversion to PsiType

GitOrigin-RevId: f5923da63184c136a5750b514163155e2870efda
This commit is contained in:
Tagir Valeev
2019-12-22 08:42:08 +00:00
committed by intellij-monorepo-bot
parent 6e2f8fab60
commit cbe2eb0d8f
@@ -361,7 +361,8 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
return false;
}
return !isNull(dfaLeft) && !isNull(dfaRight) &&
DfaUtil.isComparedByEquals(getPsiType(dfaLeft)) && DfaUtil.isComparedByEquals(getPsiType(dfaRight));
TypeConstraint.fromDfType(getDfType(dfaLeft)).isComparedByEquals() &&
TypeConstraint.fromDfType(getDfType(dfaRight)).isComparedByEquals();
}
private static boolean isSuperValue(DfaValue superValue, DfaValue subValue) {