~ chicken-core (chicken-5) f212116515aea9d99f1cf10c1f6b4baac6c9fab9
commit f212116515aea9d99f1cf10c1f6b4baac6c9fab9
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Jul 26 03:29:35 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Tue Jul 26 03:29:35 2011 +0200
removed inconsistency in resolution of var in eval of assignment
diff --git a/eval.scm b/eval.scm
index 35fdeb8f..3c4d08d8 100644
--- a/eval.scm
+++ b/eval.scm
@@ -324,6 +324,8 @@
(lambda v c)))
[(##core#global-ref)
+ ;;XXX this is only used in tinyclos and should be removed
+ ;; together will all other occurrences of it
(let ([var (cadr x)]) ;XXX broken - should alias (see above)
(if ##sys#eval-environment
(let ([loc (##sys#hash-table-location ##sys#eval-environment var #t)])
@@ -370,7 +372,10 @@
(and-let* ((a (assq var (##sys#current-environment)))
((symbol? (cdr a))))
(##sys#notice "assignment to imported value binding" var)))
- (let ((var (##sys#alias-global-hook j #t cntr)))
+ (let ((var
+ (if (not (assq x se)) ; global?
+ (##sys#alias-global-hook j #t cntr)
+ (or (##sys#get j '##core#primitive) j))))
(if ##sys#eval-environment
(let ([loc (##sys#hash-table-location
##sys#eval-environment
Trap