Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#296 closed defect (fixed)

Import with renaming fails when syntax refers to exported binding

Reported by: felix winkelmann Owned by: felix winkelmann
Priority: critical Milestone:
Component: expander Version: 4.5.x
Keywords: module export Cc:
Estimated difficulty:

Description

(reported by Imran Rafique)

The following fails:

(module foo (bar baz)
(import scheme chicken)

(define (baz x)
  (print x))

(define-syntax bar
  (syntax-rules ()
    ((_ x) (baz x))))

)

(import (prefix foo f:))
(f:bar 1)

If the export list is replaced by ((bar baz)), then it works. The reason is that the SE of bar in the former case does not contain baz.

Change History (3)

comment:1 Changed 14 years ago by felix winkelmann

Update: this example works if the module and the import are compiled, separately. So the cases where it fails are:

  • module loaded and imported in the interpreter
  • module compiled and imported in the same unit

comment:2 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

comment:3 Changed 13 years ago by felix winkelmann

Milestone: 4.6.0

Milestone 4.6.0 deleted

Note: See TracTickets for help on using tickets.