(declaim (ftype (function () (values &optional nil)) my-error)) (defun my-error () (error "Oops")) (defvar *a* t) (defun foo () (if *a* (values 1 2 3) (my-error))) ;; ; SLIME 2.29.1 ;; ; file: /home/death/tmp/foo.lisp ;; ; in: DEFUN FOO ;; ; (VALUES 1 2 3) ;; ; ;; ; caught STYLE-WARNING: ;; ; Result is a (VALUES (INTEGER 1 1) (INTEGER 2 2) (INTEGER 3 3) &OPTIONAL), ;; ; not a (VALUES &OPTIONAL). ;; ; See also: ;; ; The SBCL Manual, Node "Handling of Types" ;; ; ;; ; compilation unit finished ;; ; caught 1 STYLE-WARNING condition ;; CL-USER> (foo) ;; ; No value ;; CL-USER>