Opened 14 years ago

Closed 14 years ago

#131 closed defect (fixed)

check for defined exports may be confused by renaming

Reported by: felix winkelmann Owned by: felix winkelmann
Priority: major Milestone: 4.5.0
Component: expander Version: 4.2.x
Keywords: modules Cc:
Estimated difficulty:

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))))

Change History (3)

comment:1 Changed 14 years ago by felix winkelmann

Milestone: 4.3.04.4.0

This is a major bug, but can be postponed for a later release.

comment:2 Changed 14 years ago by (none)

Milestone 4.4.0 deleted

comment:3 Changed 14 years ago by felix winkelmann

Milestone: 4.5.0
Resolution: fixed
Status: newclosed

Fixed in be4ec378a6f47a94805652b6f126e95967cbb805 (experimental). Module forms are now completely stripped before being processed by the interpreter or compiler.

Note: See TracTickets for help on using tickets.