[armedbear-devel] couple of difficult to debug clos situations

Erik Huelsmann ehuels at gmail.com
Sun Feb 13 11:41:37 UTC 2011


Hi Alan,

Just a second ago, in r13217, I committed a change which results a
much clearer error message when instantiating a class which depends on
forward referenced classes.

Could you verify and confirm the fix, please?

Thanks in advance!

Bye,


Erik.

On Wed, Jan 5, 2011 at 6:26 AM, Alan Ruttenberg
<alanruttenberg at gmail.com> wrote:
> (defclass a (b))
> (make-instance 'a)
> ; Evaluation aborted on NIL.
> ;; no backtrace in slime
> The problem is that b is not defined, but the error makes this
> difficult to discern.
>
> ---
>
> Trying to fix the problem in some ways leads to more:
>
> (defclass a1 (b1))
> (defclass b2 ())
> CL-USER> (make-instance 'a1)
> ; Evaluation aborted on NIL.
> ;; no backtrace in slime
> CL-USER> (defclass a1 (b2))
> ; Evaluation aborted on NIL.
> ;; no backtrace in slime
> ---
>
> (defclass a3 (b3))
> (mop::class-prototype (find-class 'a3))
> ;; here we get a backtrace:
> #<STANDARD-CLASS A3 {1E8E471}> is not finalized.
>
> However it is hard to figure out what the problem is.
>
> Now try to fix it:
>
> (defclass b3 ())
> (mop::class-prototype (find-class 'a3))
> ;; still get "is not finalized" error
> (make-instance 'a3)
> ;; succeeds
> (mop::class-prototype (find-class 'a3))
> ;; now it succeeds
>
> -Alan
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>




More information about the armedbear-devel mailing list