[Openmcl-devel] Suggested patch for parse-defmethod

Gary King gwking at metabang.com
Tue Dec 20 08:47:24 PST 2005


You'll like this  patch depending on whether or not you think the  
following should produce an unused lexical variable warning.

? (defmethod foo ((x number) a) (print x))

Under one interpretation, a is used to specialize this method and so  
is not unused.

In any case, here is the patch.

Index: macros.lisp
===================================================================
RCS file: /usr/local/tmpcvs/openmcl/ccl/lib/macros.lisp,v
retrieving revision 1.12
diff -u -w -r1.12 macros.lisp
--- macros.lisp 5 Oct 2005 03:24:30 -0000       1.12
+++ macros.lisp 20 Dec 2005 16:44:35 -0000
@@ -1666,6 +1666,7 @@
                          (push `(type ,p ,(%car parameters)) types)))
                       (t (signal-program-error "Illegal arg ~S" p))))
                (t
+               (push p refs)
                 (push p parameters)
                 (push t specializers-form)
                 (push t specializers)))))

-- 
Gary Warren King
metabang.com
http://www.metabang.com/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2367 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20051220/ead832d2/attachment.bin>


More information about the Openmcl-devel mailing list