[postmodern-devel] Bug when redefining a class.
Marijn Haverbeke
marijnh at gmail.com
Wed Mar 11 08:39:02 UTC 2009
Hi,
It appears that, when redefining a class, the class options that are
not specified are left as they were in the old class, rather than
reverting to their initform, as one would expect. All implementations
seem to agree on this, so I'll assume it's standard behaviour. I've
added a kludge to the metaclass' shared-initialise, which seems to
solve this.
Best,
Marijn
On Tue, Mar 10, 2009 at 10:21 PM, Lucas Hope <lucas.r.hope at gmail.com> wrote:
> Hi again,
>
> The following triggers an incorrect error for me. Not a major bug
> since the third case provides a workaround.
>
> (defclass FOO ()
> ((bar :col-type real))
> (:metaclass dao-class)
> (:keys baz))
>
> (dao-table-definition 'foo) ;; correct error.
>
> ;; redefine:
> (defclass FOO ()
> ((bar :col-type real))
> (:metaclass dao-class))
> ;; incorrect error!
>
> ;; redefine:
> (defclass FOO ()
> ((bar :col-type real))
> (:metaclass dao-class)
> (:keys bar))
> ;; works, then can run the second defclass successfully.
>
> -Luke
>
> _______________________________________________
> postmodern-devel mailing list
> postmodern-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel
>
More information about the postmodern-devel
mailing list