Opened 10 years ago

Closed 10 years ago

#15 closed defect (fixed)

let-syntax and letrec-syntax don't recognize local vars in compiled code

Reported by: ashinn Owned by: felix
Priority: critical Milestone:
Component: compiler Version: 4.0.1
Keywords: syntax lexical scope Cc:
Estimated difficulty:

Description

The following simple module:

(module foo (foo)

(import scheme)
(define (foo)

(let ((qux 3))

(let-syntax ((bar (syntax-rules () ((bar) qux))))

(bar)))))

fails to compile with the following error:

Warning: reference to possibly unbound identifier: qux10

Error: module unresolved: foo

Call history:

<syntax> (begin35 (##sys#syntax-error-hook "no rule matches form" input17))
<syntax> (##sys#syntax-error-hook "no rule matches form" input17)
<syntax> (##sys#cdr input17)
<syntax> (begin45 (bar))
<syntax> (bar)
<eval> (##sys#cdr input17)
<eval> (##sys#eq? tail27 (quote ()))
<eval> (rename26 (syntax qux)) <--

However the same code loads and evalutes fine
in the interpreter.

Change History (2)

comment:1 Changed 10 years ago by felix

  • Priority changed from major to critical
  • Status changed from new to assigned

comment:2 Changed 10 years ago by felix

  • Resolution set to fixed
  • Status changed from assigned to closed

This might possibly be fixed in r14340.

Note: See TracTickets for help on using tickets.