fix expander tracking of unbound phase-1 identifiers
Thanks to Mitchell McLean and Jacob Ginspark for the report.
This commit is contained in:
parent
60b6b43485
commit
ecde607a62
|
@ -2037,4 +2037,19 @@
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(module provide-transformer-set!-and-broken-module-begin racket
|
||||||
|
(provide
|
||||||
|
(for-syntax set!)
|
||||||
|
(rename-out (defined-begin #%module-begin)))
|
||||||
|
|
||||||
|
(define-syntax (defined-begin stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ e ...)
|
||||||
|
#`(#%plain-module-begin #,@(map expand (syntax->list #'(e ...))))])))
|
||||||
|
|
||||||
|
(err/rt-test (eval '(module m 'provide-transformer-set!-and-broken-module-begin (set! x 1)))
|
||||||
|
exn:fail:syntax?)
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -692,10 +692,12 @@ void scheme_register_unbound_toplevel(Scheme_Comp_Env *env, Scheme_Object *id)
|
||||||
{
|
{
|
||||||
Comp_Prefix *cp = env->prefix;
|
Comp_Prefix *cp = env->prefix;
|
||||||
|
|
||||||
if (!cp->unbound) cp->unbound = scheme_null;
|
if (cp) {
|
||||||
|
if (!cp->unbound) cp->unbound = scheme_null;
|
||||||
id = scheme_make_pair(id, cp->unbound);
|
|
||||||
cp->unbound = id;
|
id = scheme_make_pair(id, cp->unbound);
|
||||||
|
cp->unbound = id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void scheme_merge_undefineds(Scheme_Comp_Env *exp_env, Scheme_Comp_Env *env)
|
void scheme_merge_undefineds(Scheme_Comp_Env *exp_env, Scheme_Comp_Env *env)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user