Ticket #1006 (new enhancement)

Opened 2 years ago

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

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

Description

(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.
Note: See TracTickets for help on using tickets.