mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Allow local to have same identifier as a prim
Allow a local variable to use the same identifier as a primitive, by renaming the local and shadowing the primitive within that scope.
This commit is contained in:
parent
c23d3c4a7a
commit
f00929971d
1 changed files with 3 additions and 1 deletions
|
@ -1194,7 +1194,9 @@
|
|||
,(if->then new-ast)))
|
||||
(else
|
||||
new-ast))))
|
||||
((prim-call? ast)
|
||||
((and (prim-call? ast)
|
||||
;; Not a primitive if the identifier has been redefined
|
||||
(not assoc (car ast) renamed))
|
||||
(let ((converted
|
||||
(cons (car ast)
|
||||
(map (lambda (a) (convert a renamed))
|
||||
|
|
Loading…
Add table
Reference in a new issue