DECLAIM does not seem to respect user defined declarations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
Consider a user defined declaration FOO:
(defpackage cl-cltl2
(:use :cl :sb-cltl2))
(in-package :cl-cltl2)
(define-
(print :called)
(values :function
(list (list fn-name 'foo info))))
Then, DECLAIM-ing FOO has no effect on the value returned by FUNCTION-
(declaim (foo hello fn))
(function-
DECLAIM does work as expected on the pre-provided declarations such as TYPE or FTYPE.
Things also work as expected when DECLARE is used:
(defmacro env-info (fn-name &environment env)
`(quote ,(multiple-
(locally (declare (foo hello fn))
(env-info fn))
;=> (NIL NIL ((FOO FOO HELLO FN)))
I'm using SBCL 2.3.1.