DfaValue (@NotNull DfaValueFactory factory, @NotNull DfaMemoryState state, @NotNull DfaValue @NotNull ... arguments) { PsiType superClass = state.getDfType(arguments[1]).getConstantOfType(PsiType.class); PsiType subClass = state.getDfType(arguments[0]).getConstantOfType(PsiType.class); if (superClass != null && subClass != null) { TypeConstraint superType = TypeConstraints.instanceOf(superClass); TypeConstraint subType = TypeConstraints.instanceOf(subClass); if (subType.meet(superType) == TypeConstraints.BOTTOM) { return factory.fromDfType(DfTypes.FALSE); } else { TypeConstraint negated = subType.tryNegate(); if (negated != null && negated.meet(superType) == TypeConstraints.BOTTOM) { return factory.fromDfType(DfTypes.TRUE); } } } return factory.getUnknown(); }