[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pcl 2-6-90 handling of &key
- To: CommonLoops.pa@Xerox.COM
- Subject: pcl 2-6-90 handling of &key
- From: alarson@SRC.Honeywell.COM (Aaron Larson)
- Date: 8 Feb 90 00:25:40 GMT
- Newsgroups: ext.commonloops
- Posted-date: 8 Feb 90 00:25:40 GMT
- Redistributed: CommonLoops.pa
- Sender: news@src.honeywell.COM
According to my reading of the lambda list congruency rules, the following
should be permitted, but isn't.
Allegro CL 3.1.4 [Sun4] (12/1/89)
Copyright (C) 1985-1989, Franz Inc., Berkeley, CA, USA
<cl> (defmethod bar ((a integer) &key))
#<Standard-Method BAR (INTEGER) 57176026>
<cl> (defmethod bar ((a symbol) &key x))
Error: Attempt to add the method #<Standard-Method NIL (SYMBOL) 57227606>
to the generic function #<Function BAR @ #xbcf1a6>.
But the method and generic function differ in whether they accept
rest or keyword arguments.
[1] <cl> :zo
Evaluation stack:
->(ERROR "Attempt to add the method ~S to the generic function ~S.~%~
But ~A" #<Standard-Method NIL (SYMBOL) 57227606> ...)
(#:|.ADD-ARG-INFO.a97aa869| "the method and generic function differ in
whether they accept~%~
rest or keyword arguments.")
(ADD-ARG-INFO #<Function BAR @ #xbcf1a6> #<Standard-Method NIL (SYMBOL)
57227606> ...)
(REAL-ADD-METHOD #<Function BAR @ #xbcf1a6> #<Standard-Method NIL
(SYMBOL) 57227606>)
(ADD-METHOD #<Function BAR @ #xbcf1a6> #<Standard-Method NIL (SYMBOL)
57227606>)
(REAL-ADD-NAMED-METHOD BAR NIL ...)
(LOAD-DEFMETHOD-INTERNAL BAR NIL ...)
(LOAD-DEFMETHOD STANDARD-METHOD BAR ...)
... more older frames ...
[1] <cl>