inlined-generic-function
inlined-generic-function copied to clipboard
Interacts badly with package loading
When using inlined-generic-functions and loading packages via quicklisp, inlined generics do not call the desired make-method-lambda
method.
See example in https://github.com/bon/igtest.
Clone it to somewhere quicklisp can see it and try:
sbcl --load ptest.lisp
Note how make-method-lambda
is traced and how its method for standard-generic-function
gets called for foo
instead of the method for inlined-generic-function
that you would expect.
BTW I think this might have been at the root of issue #3. I'll check that when we get to the bottom of this issue.
@bon @guicho271828 I seem to be having this issue too. Defining things at the REPL seems ok, but as soon as it gets into an ASD and loaded with ASDF/Quicklisp, it errors.
; The slot INLINED-GENERIC-FUNCTION.IMPL::LAMBDA-EXPRESSION is unbound in the
; object ...
It looks like there's something awry with when things are getting evaluated/stored in the environment. EVAL-WHEN (:compile-toplevel :load-toplevel :execute)
around the defgeneric/defmethod seems to "fix" it. Maybe there is something more specific we can figure out from this?
This lib is experimental and sort of proof-of-concept, but I would love to come up with a fix.