Commit 8c08fd8b authored by mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Fixes ticket #199: CL-METHOD failure for &AUX arguments.

DEFGENERIC specified with &AUX arguments now signals an error.

Removed badly conceived BUGS.AUX.1 test which blew up the stack due to
recursively referencing itself in the &AUX init form.
parent 899450d2
......@@ -1403,6 +1403,12 @@
(push item options))))
(setf options (nreverse options)
methods (nreverse methods))
;;; Since DEFGENERIC currently shares its argument parsing with
;;; DEFMETHOD, we perform this check here.
(when (find '&aux lambda-list)
(error 'program-error
:format-control "&AUX is not allowed in a generic function lambda list: ~S"
:format-arguments (list lambda-list)))
......@@ -1981,8 +1987,13 @@ Initialized with the true value near the end of the file.")
(lambda-list (%generic-function-lambda-list gf))
(exact (null (intersection lambda-list
'(&rest &optional &key
&allow-other-keys &aux)))))
(if exact
(no-aux (null (some
(lambda (method)
(find '&aux (std-slot-value method 'sys::lambda-list)))
(sys:%generic-function-methods gf)))))
(if (and exact
((= number-required 1)
......@@ -115,19 +115,7 @@ Subject: [armedbear-devel] Bug in translate-logical-pathname.
(deftest bugs.clos.aux.1
;;; XXX possible collision with previously defined names
(defclass room ()
((decorators :reader room-decorators)))
(defgeneric decorators (room))
(defmethod decorators ((room room)
&aux (d (decorators room)))
(decorators (make-instance 'room)))
(deftest bugs.aux.1
(deftest bugs.clos.aux.1
((lambda (a &aux (b (+ a 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