Antonio Martinez <antonio.martinez.shotton@...> writes:
> On 06 Mar 2005 23:05:47 +0100, "Tim Daly Jr." <tim@...> wrote:
> > Now we load it, run the test, delete the package :foockage, load it
> > again, and the generic function FLOT will signal an error (please
> > pardon the verbosity):
> But you're /not/ doing this! You're compiling it first:
> > * (load (compile-file "/tmp/test.lisp"))
> If you /don't/ compile, but just load the file, you'll get the
> behaviour you expect.
If I start a fresh lisp, load the fasl, delete the package, load the
fasl again, and run the test, I get the same error. If I remove the
fasl, start a fresh lisp, and just load from source both times, I also
get the same error. So I don't think that explicitly calling
> The compiler is substituting the make-instance call with a direct call
> to the constructor, that is, without going through the class symbol
> indirection. This means that when the file is loaded the second time,
> the constructor call returns an instance of #:FOOASS (i.e. the /first/
> FOOASS symbol, now uninterned), /not/ the current FOOASS class. Since
> FLOT is defined for the second, but not the former, you get a no
> applicable method error.
> Declaring make-instance as notinline should get you the semantics you
> want wrt delete-package interaction.
Issuing a (declaim (notinline make-instance)) before compiling does
indeed work around the problem. Thanks.