Fixes a bug in top-level set! that caused the following to signal an

error:

> (define foo 12)
> (begin ((lambda (x) (set! foo x)) 13) 14)
This commit is contained in:
Abdulaziz Ghuloum 2007-11-17 01:16:24 -05:00
parent 97672d5990
commit 7e1c6001eb
1 changed files with 7 additions and 2 deletions

View File

@ -2384,8 +2384,13 @@
(build-lexical-assignment no-source
value
(chi-expr v r mr)))
((global core-prim)
(stx-error e "cannot modify imported identifier in"))
((core-prim)
(stx-error e "cannot modify imported core primitive"))
((global)
(let ((loc (gen-global-var-binding x e)))
(let ((rhs (chi-expr v r mr)))
(build-global-assignment no-source loc rhs))))
; (stx-error e "cannot modify imported identifier in"))
((global-macro!)
(chi-expr (chi-global-macro value e) r mr))
((local-macro!)