Scan closure free variables

This commit is contained in:
Justin Ethier 2021-03-17 22:32:56 -04:00
parent 80ad85883b
commit d36f0aeb64

View file

@ -2109,7 +2109,8 @@
((tagged-list? '%closure exp)
(let* ((lam (closure->lam exp))
(body (car (ast:lambda-body lam))))
(scan body)))
(scan body)
(for-each scan (closure->fv exp))))
;; Global definition
((define? exp)
(scan (car (define->exp exp))))