Ref<PyType> (@NotNull PyBinaryExpression expression, @NotNull Context context) { if (expression.getOperator() != PyTokenTypes.OR) return null; PyExpression left = expression.getLeftExpression(); PyExpression right = expression.getRightExpression(); if (left == null || right == null) return null; Ref<PyType> leftTypeRef = getType(left, context); Ref<PyType> rightTypeRef = getType(right, context); if (leftTypeRef == null || rightTypeRef == null) return null; PyType leftType = leftTypeRef.get(); if (leftType != null && typeHasOverloadedBitwiseOr(leftType, left, context)) return null; PyType union = PyUnionType.union(leftType, rightTypeRef.get()); return union != null ? Ref.create(union) : null; }