Ticket #518 (closed defect: fixed)
strip-syntax returns wrong value for renamed symbols exported form a module
| Reported by: | syn | Owned by: | sjamaan |
|---|---|---|---|
| Priority: | major | Milestone: | 4.9.0 |
| Component: | unknown | Version: | 4.6.x |
| Keywords: | Cc: |
Description
Stripping syntax from symbols in a macro that have previously been renamed and happen to have the same name as a symbol exported by the module the macro is defined in returns the symbol prefixed with the module name. This is particularly annoying with IR macros which rename all symbols implicitly and thus this problem is likely to occur.
The problem can be reproduces using the following program. It outputs "no: foo#baz" when it should actually output "yes: baz".
(module foo
;; not exporting baz makes it work as expected
(bar baz)
(import chicken scheme)
(define baz 'qux)
(define-syntax bar
(er-macro-transformer
(lambda (x r c)
(let ((e (strip-syntax (r (cadr x)))))
(if (eq? 'baz e)
(display "yes: ")
(display "no: "))
(display e)
'(void)))))
)
(import foo)
(bar baz)
Change History
Note: See
TracTickets for help on using
tickets.
