2 Apr 2005 15:37
method names for already existing functions
Martin Elster <martin <at> 1103.org>
2005-04-02 13:37:41 GMT
2005-04-02 13:37:41 GMT
Greetings,
Sometimes I forget not to call accessor methods FORMAT, TYPE etc.
> (defclass foo ()
((format :accessor format)))
Error: "FORMAT already names an ordinary function or a macro.".
> (defclass foo ()
((file-format :accessor file-format)))
Error: "FORMAT already names an ordinary function or a macro.".
I expected my redefinition to work, but apparently it doesn't. Is this
a bug, or just a case of "Don't do that then"?
Also, on a similar note,
> (defclass bar ()
((type :accessor type)))
debugger invoked on a SYMBOL-PACKAGE-LOCKED-ERROR in thread 20039:
Lock on package COMMON-LISP violated when setting fdefinition of TYPE.
[....]
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Ignore the package lock.
1: [IGNORE-ALL ] Ignore all package locks in the context of this
operation.
2: [UNLOCK-PACKAGE] Unlock the package.
3: [ABORT ] Reduce debugger level (leaving debugger, returning to
toplevel).
4: [TOPLEVEL ] Restart at toplevel READ/EVAL/PRINT loop.
>:ABORT
(Continue reading)
RSS Feed