Re: Bug report

C Habs <[email protected]> Tue, 22 Oct 2019 13:52:22 +0000
Newsgroups gmane.lisp.clisp.general
Message-ID <CANe8y8Znpb06_QzAN5gTKncHRiRw2EW05o88rGo0f1cyQV5syA@mail.gmail.com>
On Tue, 22 Oct 2019 at 12:31, Matthias Lindner <[email protected]>
wrote:

> Hi,
>
>
> I think there is some confusion here, as the initial code given, was not
> exactly the one that is causing the issues.
>

What is the confusion.  This is the reported 'failing' code:

(defclass test () ((arglist :accessor :arglist)))

And that code entered into the REPL on a CLISP 2.49, does not throw any
error as I commented early on.

Therefore, it does seem to be something else, somewhere, conflicting.
Whether that is due to changes in CLISP between 2.40 to 2.49 (which would
be surprising if so), or due to some 'imported' code as a result of library
load etc is what I think previous respondees have tried to guide on as a
reason for the failure.

Or have I understood it wrong ?



>
> Tim, I think what you are trying to do is not (defclass foo () ((a
> :accessor *:*arglist)))but (defclass foo () ((a :accessor arglist))),
> i.e. you are trying to create a generic accessor function fbound to
> 'arglist and not to :arglist.
>
> If this is the case, then this fails, as #'ext:arglist is imported in
> CL-USER, which makes a lot of sense, as it is used to determine the list
> of arguments accepted by any function.
>
> A possible fix here is, if you really insist on redefining #'arglist in
> CL-USER, to shadow the symbol:
>
> [1]> (defclass foo () ((a :accessor arglist)))
>
> *** - DEFMETHOD: ARGLIST does not name a generic function
> The following restarts are available:
> ABORT          :R1      Abort main loop
> Break 1 [2]> :q
> [3]> (shadow 'arglist)
> T
> [4]> (defclass foo () ((a :accessor arglist)))
> #<STANDARD-CLASS FOO>
> [5]> #'arglist
> #<STANDARD-GENERIC-FUNCTION ARGLIST>
> [6]> #'ext:arglist
> #<COMPILED-FUNCTION EXT:ARGLIST>
> [7]>
>
> Cheers
>
>
> --Matthias
>
>
>
Again, I am not sure why the above is relevant if  2.40 and 2.49 CLISP have
not varied, other than something somewhere  is being loaded after starting
CLISP and is introducing an error on the reported code: (defclass test ()
((arglist :accessor :arglist)))

Of course, my comments are made without the full appreciation of all the
code involved.

Regards
Habs

_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list