fix expander problem with set!

This commit is contained in:
Matthew Flatt 2015-05-09 18:32:49 -06:00
parent 7fb67ad644
commit 6f984d868c
2 changed files with 14 additions and 1 deletions

View File

@ -2100,6 +2100,19 @@
m))))
m))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Make sure that `set!` works right in forced subform expansion:
(let ()
(define (time-print-mixin t%)
(define start-time #f)
(class t%
(super-new)
(define/override (m)
(set! start-time 1)
(super m))))
(void time-print-mixin))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(report-errs)

View File

@ -1799,7 +1799,7 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags,
if (SCHEME_FALSEP(val)) {
/* Corresponds to a run-time binding (but will be replaced later
through a renaming to a different binding) */
if (flags & SCHEME_OUT_OF_CONTEXT_LOCAL)
if (flags & (SCHEME_OUT_OF_CONTEXT_LOCAL | SCHEME_SETTING))
return scheme_make_local(scheme_local_type, 0, 0);
return NULL;
}