|
[Sbcl-help] "Assignment to argument: X prevents use of assertion
from function type proclamation: "
From: Tobias C. Rittweiler <tcr@fr...> - 2009-09-25 19:43
|
(declaim (ftype (function (symbol) (values symbol &optional))
foo))
(defun foo (x)
(check-type x symbol)
x)
; in: DEFUN FOO
; (DEFUN FOO (X) (CHECK-TYPE X SYMBOL) X)
; --> PROGN EVAL-WHEN
; ==>
; (SB-IMPL::%DEFUN 'FOO
; (SB-INT:NAMED-LAMBDA FOO
; (X)
; (BLOCK FOO (CHECK-TYPE X SYMBOL) X))
; NIL 'NIL (SB-C:SOURCE-LOCATION))
;
; note: Assignment to argument: X
; prevents use of assertion from function type proclamation:
; SYMBOL
;
;
; compilation unit finished
; printed 1 note
Can anyone explain this one? The check-type is there for implementations
which do not interpret declarations as assertions.
-T.
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-help] "Assignment to argument: X prevents use of assertion from function type proclamation: " | Tobias C. Rittweiler <tcr@fr...> |