Allow local vars to shadown primitives

This commit is contained in:
Justin Ethier 2018-01-19 16:45:44 -05:00
parent 183b3c5eb2
commit 2c9e9e7a39

View file

@ -888,7 +888,9 @@
;;(newline)
(cond
((const? exp) exp)
((prim? exp) exp)
((and (prim? exp) ;; Allow lambda vars to shadown primitives
(not (assoc exp local-renamed)))
exp)
((ref? exp)
(let ((renamed (assoc exp local-renamed)))
(if renamed
@ -1130,7 +1132,8 @@
;(newline (current-error-port))
(cond
((or (const? this-exp)
(prim? this-exp)
(and (prim? this-exp)
(not (assoc this-exp local-renamed)))
(quote? this-exp)
(define-c? this-exp))
;(log this-exp)