Summary
check for defined exports may be confused by renaming
Metadata
- Id: 7ee197cd13571058753857f7e529c2af2e30bc27
- Trac id: 131
- Type: defect
- Reporter: felix
- Owner: felix
- Cc:
- Status: closed
- Component: expander
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.5.0
- Version: 4.2.x
- Changetime: 2010-03-12 12:02:28 UTC
- Created: 2009-11-25 22:10:18 UTC
- Keywords: modules
Description
If a macro expands into a module-definition, the check for missing export definitions appears not to take renaming into account:
(define-syntax testm
(syntax-rules ()
((_)
(module foo (bar)
(import scheme)
(define bar 1)))))
gives an "unresolved module" error.
Possibly, these tests using `assq` are incorrect and should lookup the id first (`##sys#finalize-module` in `expand.scm`):
(let ((def (assq id dlist))) (if (and def (symbol? (cdr def))) (cdr def) (let ((a (assq id (##sys#current-environment))))
Changes and comments
[2009-12-03 20:05:06 UTC] felix changed milestone from 4.3.0 to 4.4.0
[2009-12-03 20:05:06 UTC] felix wrote:
This is a major bug, but can be postponed for a later release.
[2010-03-11 10:33:12 UTC] Milestone 4.4.0 deleted
[2010-03-12 12:02:28 UTC] felix changed status from new to closed
[2010-03-12 12:02:28 UTC] felix set resolution to fixed
[2010-03-12 12:02:28 UTC] felix set milestone to 4.5.0
[2010-03-12 12:02:28 UTC] felix wrote:
Fixed in be4ec378a6f47a94805652b6f126e95967cbb805 (experimental). Module forms are now completely stripped before being processed by the interpreter or compiler.