[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
&allow-other-keys and call-next-method bug
- To: Gregor.pa@Xerox.COM
- Subject: &allow-other-keys and call-next-method bug
- From: Rob Pettengill <rcp%sw.MCC.COM@MCC.COM>
- Date: Sun, 24 Jan 88 11:47:06 CST
- Cc: CommonLoops.pa@Xerox.COM
- Redistributed: CommonLoops.pa
Keywords defined in inherited methods are not passed to the inherited
method when they are not explicitly defined in subclass methods as
well. The following example with &allow-other-keys illustrates the problem.
Sun Common Lisp 3.0.beta.68 [sun3 with patch level 6] (12/28/87 15:49)
Copyright (C) 1985-1987, Franz Inc., Berkeley, CA, USA
<cl> pcl::*PCL-SYSTEM-DATE*
"8/27/87 August 27th, 1987"
<cl> (defclass foo () ())
#<Class FOO 36335261>
<cl> (defmethod test ((self foo) &key (foo t) &allow-other-keys)
(print foo))
#<Method TEST (FOO) 36342361>
<cl> (defclass bar (foo) ())
#<Class BAR 36344621>
<cl> (defmethod test ((self bar) &key (bar t) &allow-other-keys)
(call-next-method) (print bar))
#<Method TEST (BAR) 36350751>
<cl> (setq foo (make-instance 'foo))
#<Standard-Instance 36353431>
<cl> (test foo)
T
T
<cl> (setq bar (make-instance 'bar))
#<Standard-Instance 36354341>
<cl> (test bar)
T
T
T
<cl> (test foo :foo :hello-foo)
:HELLO-FOO
:HELLO-FOO
<cl> (test bar :bar :hello-bar)
T
:HELLO-BAR
:HELLO-BAR
<cl> (test bar :bar :hello-bar :foo :hello-foo)
T
:HELLO-BAR
:HELLO-BAR
As you can see we are missing :HELLO-FOO and only seeing the default
:foo = T.
;rob
Robert C. Pettengill, MCC Software Technology Program
P. O. Box 200195, Austin, Texas 78720
ARPA: rcp@mcc.com PHONE: (512) 338-3533
UUCP: {ihnp4,seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!rcp