Incorrectly inlining variable after macro expansion

Create issue
Issue #281 new
Takashi Kato repo owner created an issue

This should be a compile error

#!r6rs
(import (rnrs))

(define y 0)

(define (double-y)
  (let ((plus-y (lambda (x) (+ x y))))
    ;;(set! plus-y (lambda (x) (+ x y)))
    (let-syntax ((macro (lambda (x)
              (syntax-case x ()
                ((_ a) #`(+ a #,(plus-y 0)))))))
      (display (macro y))
      (newline))))

(double-y)

Comments (0)

  1. Log in to comment