Opened 8 years ago

#1006 new enhancement

(the (values ...) ...) not checked in safe code

Reported by: jlawrence Owned by:
Priority: normal Milestone:
Component: other Version: trunk
Keywords: Cc:


(defun foo (x)
  (declare (optimize (safety 3) (debug 3) (speed 0)))
  (the (values fixnum &optional) (+ x x)))

(defun bar (x)
  (declare (optimize (safety 3) (debug 3) (speed 0)))
  (the fixnum (+ x x)))

(print (foo most-positive-fixnum))
;;=> 1073741822

(print (bar most-positive-fixnum))
;;=> Error: The value 1073741822 is not of the expected type FIXNUM.

Change History (0)

Note: See TracTickets for help on using tickets.