repair for re-expansion of an implicit-form expansion

The repair in 385f9588f8 propagates the
must-be-bound callback too far. It shouldn't be propagated anymore after
a non-rename transformer is applied.

Closes #2048
This commit is contained in:
Matthew Flatt 2018-04-30 21:05:09 -06:00
parent 53c1b5b1db
commit 6f31650539
3 changed files with 16 additions and 5 deletions

View File

@ -1950,6 +1950,16 @@
(let-syntax ([#%datum (make-rename-transformer #'unbound)])
(+ 1 2))))
(module make-sure-not-bound-as-syntax-is-not-propagated-to-reexpansion racket/base
(module new-top racket/base
(provide #%top)
(define (helper sym) sym)
(define-syntax-rule (#%top . ID)
(helper 'ID)))
(local-require (submod 'new-top))
foobar)
;; ----------------------------------------
;; Check that definition context bindings are made available when the context is provided as fourth
;; argument of syntax-local-bind-syntaxes

View File

@ -322,7 +322,7 @@
id))
#:skip-log? (or (expand-context-only-immediate? ctx)
(rename-transformer? t))
#:fail-non-transformer fail-non-transformer)])]))
#:fail-non-transformer (and (rename-transformer? t) fail-non-transformer))])]))
;; Handle the expansion of a variable to itself
(define (dispatch-variable t s id ctx binding primitive? protected?)

View File

@ -39985,11 +39985,12 @@ static const char *startup_source =
"(let-values(((or-part_263)"
"(expand-context-only-immediate? ctx_23)))"
"(if or-part_263 or-part_263(1/rename-transformer? t_53))))"
"((fail-non-transformer199_0) fail-non-transformer_4))"
"((temp199_0)"
"(if(1/rename-transformer? t_53) fail-non-transformer_4 #f)))"
"(expand9.1"
" temp197_0"
" #t"
" fail-non-transformer199_0"
" temp199_0"
" #t"
" temp198_0"
" #t"