Lisp HUG Maillist Archive

fixnum-safety

Sorry for maybe not having understood this completely enough. But the 
following compilation warning seems somewhat strange to me:

(declaim (optimize (safety 1) (speed 3) (space 0) (float 1) (debug 0)
(fixnum-safety 2)))

(defun toll (a b)
   (declare (type single-float a b))
   (the single-float (+ a b)))

;;;*** Warning in TOLL: Declared types SINGLE-FLOAT and FIXNUM are 
disjoint.
; TOLL
;;; Compilation finished with 1 warning, 0 errors.

(toll 3 4) works fine.

If I invoke (toll 3.4 6.7): Error: In + of (3.4 6.7) args should be of 
type NUMBER.

If I remove the declare statement (as well as (the ...)), I have the 
same error.

Cheers,
       P.


Unable to render article 1916 because of ":DEFAULT stream decoding error on #<SB-SYS:FD-STREAM for \"socket 192.168.43.216:64816, peer: 116.202.254.214:119\" {1006B03FF3}>: the octet sequence #(246 115 99 104) cannot be decoded." error

Updated at: 2020-12-10 08:57 UTC