Commit aacaa3cb authored by pfdietz's avatar pfdietz
Browse files

Added more invalid keyword parameter error tests.

parent 15b50170
......@@ -173,6 +173,27 @@
(error () :good))
;;; A close reading of the rules for keyword arguments to
;;; generic functions convinced me that the following two
;;; error tests are necessary. See sections 7.6.5 of the CLHS.
(deftest defgeneric.error.20
(let ((fn (defgeneric defgeneric-error-fn.20 (x &key)
(:method ((x number) &key foo) (list x foo))
(:method ((x symbol) &key bar) (list x bar)))))
(funcall fn 1 :bar 'a)))
(deftest defgeneric.error.21
(let ((fn (defgeneric defgeneric-error-fn.21 (x &key)
(:method ((x number) &key foo &allow-other-keys) (list x foo))
(:method ((x symbol) &key bar) (list x bar)))))
(funcall fn 'x :foo 'a)))
;;; Non error cases
(deftest defgeneric.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment