[armedbear-cvs] r13972 - trunk/abcl/src/org/armedbear/lisp

rschlatte at common-lisp.net rschlatte at common-lisp.net
Sun Jun 17 12:01:53 UTC 2012


Author: rschlatte
Date: Sun Jun 17 05:01:52 2012
New Revision: 13972

Log:
Allow multiple declare forms in defgeneric

- fixes ansi test defgeneric.26

Modified:
   trunk/abcl/src/org/armedbear/lisp/clos.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	Sun Jun 17 04:26:43 2012	(r13971)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Sun Jun 17 05:01:52 2012	(r13972)
@@ -1417,12 +1417,7 @@
     (dolist (item options-and-method-descriptions)
       (case (car item)
         (declare
-         (when declarations
-           (error 'program-error
-                  :format-control "Two declare forms in definition of generic function ~S."
-                  :format-arguments (list function-name)))
-         (setf declarations t)
-         (push (list :declarations (cdr item)) options))
+         (setf declarations (append declarations (cdr item))))
         (:documentation
          (when documentation
            (error 'program-error
@@ -1437,6 +1432,7 @@
           methods))
         (t
          (push item options))))
+    (when declarations (push (list :declarations declarations) options))
     (setf options (nreverse options)
           methods (nreverse methods))
     ;;; Since DEFGENERIC currently shares its argument parsing with




More information about the armedbear-cvs mailing list