236 |
(and (stringp doc) (string=t doc "boo!")))) |
(and (stringp doc) (string=t doc "boo!")))) |
237 |
(let ((doc (documentation fn 'function))) |
(let ((doc (documentation fn 'function))) |
238 |
(or (not doc) |
(or (not doc) |
239 |
(and (stringp doc) (string=t doc "boo!")))))) |
(and (stringp doc) (string=t doc "boo!")))) |
240 |
|
(setf (documentation fn t) "foo") |
241 |
|
(let ((doc (documentation fn t))) |
242 |
|
(or (not doc) |
243 |
|
(and (stringp doc) (string=t doc "foo")))) |
244 |
|
(setf (documentation fn 'function) "bar") |
245 |
|
(let ((doc (documentation fn t))) |
246 |
|
(or (not doc) |
247 |
|
(and (stringp doc) (string=t doc "bar")))))) |
248 |
|
|
249 |
t t #(a b c) #(d e f) t t) |
t t #(a b c) #(d e f) t t "foo" t "bar" t) |
250 |
|
|
251 |
(deftest defgeneric.3 |
(deftest defgeneric.3 |
252 |
(let ((fn (eval '(defgeneric defgeneric.fun.3 (x y) |
(let ((fn (eval '(defgeneric defgeneric.fun.3 (x y) |
795 |
(funcall fn 10)) |
(funcall fn 10)) |
796 |
(10 :good)) |
(10 :good)) |
797 |
|
|
798 |
|
(deftest defgeneric.35 |
799 |
|
(let ((fn (eval '(defgeneric defgeneric.fun.35 (x) |
800 |
|
(:method ((x (eql 'a))) |
801 |
|
(declare (optimize (speed 0))) |
802 |
|
"FOO" |
803 |
|
(declare (optimize (safety 3))) |
804 |
|
x))))) |
805 |
|
(values |
806 |
|
(funcall fn 'a) |
807 |
|
(let ((method (first (compute-applicable-methods fn '(a))))) |
808 |
|
(and method |
809 |
|
(let ((doc (documentation method t))) |
810 |
|
(list |
811 |
|
(or (null doc) (equalt doc "FOO")) |
812 |
|
(setf (documentation method t) "BAR") |
813 |
|
(let ((doc (documentation method t))) |
814 |
|
(or (null doc) (equalt doc "BAR"))) |
815 |
|
)))))) |
816 |
|
a (t "BAR" t)) |