logo       

Re: defmethod vs &aux?: msg#00029

lisp.corman

Subject: Re: defmethod vs &aux?

At 08:53 PM 3/7/03 -0500, Kenny Tilton wrote:
Whoa. This:

(defmethod c-link-ex ((used c-user-notifying)
        &aux (user (car *c-calculators*)))
   ...etc....

produces this in CormanLisp:

;;; An error occurred in function COMPILE-FORM:
;;; Error: &KEY following &AUX in lambda list: (USED &AUX (USER (CAR
*C-CALCULATORS*)) &KEY &ALLOW-OTHER-KEYS)

actually, some of my macros have the same bug (if this is a bug), not
handling &aux. I'll rewrite to work around. fyi.
 
It is a bug.  &KEY and &ALLOW-OTHER-KEYS must come before
&AUX in a lambda list.

Something is constructing the lambda-list incorrectly.  I poked around
a bit but was unable to discover the offending code within DEFMETHOD
and its subsidiaries.

I don't really understand why it would be trying to put &KEY and
&ALLOW-OTHER-KEYS onto a lambda list derived from one
that had no mention of &KEY  parameters or &ALLOW-OTHER-KEYS.

Unfortunately, the backtrace from the point of error seems to stop in
the middle of the compiler, and is not showing what I think it should
be showing:

(defmethod foozball ((x integer) &aux (y 5))(+ x y))
;;; An error occurred in function COMPILE-FORM:
;;; Error: &KEY following &AUX in lambda list: (X &AUX (Y 5) &KEY &ALLOW-OTHER-KEYS)
 
:b
;;; ERROR                               (File sys/conditions.lisp, line 463)
;;; #< COMPILED-FUNCTION: #x1002CBE1 >
;;; #< COMPILED-FUNCTION: #x1002892E >
;;; #< COMPILED-FUNCTION: #x1002A51A >
;;; #< COMPILED-FUNCTION: #x1002D316 >
;;; EVAL                                (File C:/Lispcode/Corman/patches-2.01/eval-patch.lisp, line 22)
;;; COMMON-LISP::HAS-TAIL-RECURSIVE-CALLS (File sys/tail-calls.lisp, line 140)
;;; COMMON-LISP::REMOVE-TAIL-RECURSION  (File sys/tail-calls.lisp, line 187)
;;; #< COMPILED-FUNCTION: #x1002CBE1 >




To unsubscribe from this group, send an email to:
cormanlisp-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise