make struct-out leave behind a disappeared use for its argument

closes PR 15263
This commit is contained in:
Robby Findler 2016-03-02 17:47:08 -06:00
parent 8eadc197a9
commit b52a4b3318

View File

@ -1074,7 +1074,18 @@
#f
"identifier is not bound to struct type information"
stx
id))))]))))
id))))]))
(λ (stx modes)
(syntax-case stx ()
[(_ id)
(and (identifier? #'id)
(struct-info? (syntax-local-value #'id (lambda () #f))))
(syntax-local-lift-expression
(syntax-property #'(void)
'disappeared-use
(syntax-local-introduce #'id)))]
[whatevs (void)])
stx)))
(define-syntax combine-out
(make-provide-transformer