[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rsl@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM: Generic functions don't test for keyword validity.]
- To: CommonLoops.pa@Xerox.COM
- Subject: [rsl@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM: Generic functions don't test for keyword validity.]
- From: Richard Lamson <rsl@max-fleischer.ila-sf.dialnet.symbolics.com>
- Date: Thu, 14 Jun 90 23:49 PDT
- Cc: rsl@max-fleischer.ila-sf.dialnet.symbolics.com
- Included-msgs: <19900426174700.6.RSL@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM>, The message of 26 Apr 90 10:47 PDT from rsl@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM, The message of 26 Apr 90 10:47 PDT from Richard Lamson
- Line-fold: No
- Redistributed: CommonLoops.pa
Date: Thu, 26 Apr 90 10:47 PDT
From: Richard Lamson <rsl@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM>
Subject: Generic functions don't test for keyword validity.
To: BUG-PCL <Gregor.pa@Xerox.COM>
cc: rsl@MAX-FLEISCHER.ILA-SF.Dialnet.Symbolics.COM
If you call TEST-METHOD (defined below) on an instance of TEST-CLASS
with a keyword other than :K1, it doesn't blow up. This is clearly
wrong. Although it's OK to put &ALLOW-OTHER-KEYS into the method
function itself, the generic function is required to check for valid
keywords.
[I was originally writing to complain that the DEFMETHOD expansion
always contained &ALLOW-OTHER-KEYS, but that appears to be allowed
by CLtL.]
(defclass test-class ()())
(defmethod test-method ((test test-class) &key k1)
(progn k1))
(defvar test (make-instance 'test-class))
(test-method test :random-keyword t) ;; Doesn't barf! Clearly wrong.