datum->syntax hides symbol in some case

Create issue
Issue #6 resolved
Takashi Kato repo owner created an issue

Run the following script

(library (aif)
    (export aif)
    (import (rnrs))
  (define-syntax aif
    (lambda (x)
      (syntax-case x ()
      ((aif expr then else)
       (with-syntax ((it (datum->syntax #'aif 'it)))
     #'(let ((it expr))
         (if it then else))))))))
(import (rnrs) (aif))
(define-syntax wrap
  (syntax-rules ()
    ((_)
     (aif 'ok it #f))))
(wrap)

This should return 'ok but raises an error

Comments (1)

  1. Log in to comment