LINUX.ORG.RU

История изменений

Исправление SZT, (текущая версия) :

(defun test (arg)
  (declare (type fixnum arg))
  (setq arg 3.14)
  (format t "I've got a value of type ~a" (type-of arg)))
; ==>
;   (THE FIXNUM 3.14)
; 
; caught WARNING:
;   Constant 3.14 conflicts with its asserted type FIXNUM.
;   See also:
;     The SBCL Manual, Node "Handling of Types"

Так что какие-то проверки типов там есть

Исходная версия SZT, :

(defun test (arg)
  (declare (type fixnum arg))
  (setq arg 3.14)
  (format t "I've got a value of type ~a" (type-of arg)))
; ==>
;   (THE FIXNUM 3.14)
; 
; caught WARNING:
;   Constant 3.14 conflicts with its asserted type FIXNUM.
;   See also:
;     The SBCL Manual, Node "Handling of Types"