Emacs' byte-compiler can tell me if I call pure functions without saving the result:
(defun foo-calls-add () ;; value returned from (+ 1 2) is unused: (+ 1 2) 12)
However, I don't get any warnings when I define my own pure functions:
(defun foo-pure (x) (declare (pure t) (side-effect-free error-free)) x) (defun foo-calls-pure () ;; No warning here: (foo-pure 1) 12)
What do I need to do in order for the byte compiler to warn about
(symbol-plist '+) with
(symbol-plist 'foo-pure) and I can't see any obvious missing properties.