-
assigned issue to
Macro expander in library top-level
Issue #267
resolved
Consider the following library:
(define-library (foo) (import (scheme base)) (export) (begin (define-syntax foo (syntax-rules () ((foo) (begin (define set! 42))))) (foo)))
When I import this library, Sagittarius complains that I attempt to modify an immutable variable.
This seems to be a bug of the macro expander. The macro expander should hygienically rename `set!`
because it is not part of the transformer's input. The renamed version of `set!`
would not clash with the imported identifier `set!`
Thanks,
Marc
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Checking immutable variable modification after renaming identifiers (Fixes
#267)→ <<cset 0ea5a3611a40>>
- Log in to comment
Thank you for the report!
I’ve confirmed the behaviour.