173 |
(error () :good)) |
(error () :good)) |
174 |
:good) |
:good) |
175 |
|
|
176 |
|
;;; A close reading of the rules for keyword arguments to |
177 |
|
;;; generic functions convinced me that the following two |
178 |
|
;;; error tests are necessary. See sections 7.6.5 of the CLHS. |
179 |
|
|
180 |
|
(deftest defgeneric.error.20 |
181 |
|
(classify-error |
182 |
|
(let ((fn (defgeneric defgeneric-error-fn.20 (x &key) |
183 |
|
(:method ((x number) &key foo) (list x foo)) |
184 |
|
(:method ((x symbol) &key bar) (list x bar))))) |
185 |
|
(funcall fn 1 :bar 'a))) |
186 |
|
program-error) |
187 |
|
|
188 |
|
(deftest defgeneric.error.21 |
189 |
|
(classify-error |
190 |
|
(let ((fn (defgeneric defgeneric-error-fn.21 (x &key) |
191 |
|
(:method ((x number) &key foo &allow-other-keys) (list x foo)) |
192 |
|
(:method ((x symbol) &key bar) (list x bar))))) |
193 |
|
(funcall fn 'x :foo 'a))) |
194 |
|
program-error) |
195 |
|
|
196 |
|
|
197 |
;;; Non error cases |
;;; Non error cases |
198 |
|
|
199 |
(deftest defgeneric.1 |
(deftest defgeneric.1 |