kchanqvq / named-closure

Introspectable, readably-printable and redefinable closures
5 stars 0 forks source link

`NAMED-CLOSURE` is broken -- nested `NCLO` #2

Closed kchanqvq closed 2 years ago

kchanqvq commented 2 years ago
(defun bork (x)
  (named-closure:nclo outer1 ()
    (named-closure:nclo inner1 () x)))

When trying to call it:

CL-USER> (funcall (funcall (bork 0)))
The variable X is unbound.
   [Condition of type UNBOUND-VARIABLE]
...
; Evaluation aborted on #<UNBOUND-VARIABLE X {1003AB4D43}>.

This is likely because of load-time-value nuking the lexical environment.

kchanqvq commented 2 years ago

This should be fixed by 7305939b34372164fbaa1d4349ebaef7287144a6.