macro expander: fix #%top
via local-expand
Fix bug in b25a2b83ba
that breaks the teaching languages.
This commit is contained in:
parent
8f8e3b7c65
commit
816d09bb24
|
@ -1085,6 +1085,14 @@
|
|||
(error 'test "bad expansion: ~e" e)]))])
|
||||
(m))
|
||||
|
||||
(test 10 values
|
||||
(let-syntax ([#%top (lambda (stx)
|
||||
(syntax-case stx ()
|
||||
[(_ . id) #'10]))])
|
||||
(let-syntax ([m (lambda (stx)
|
||||
(local-expand #'nonsuch 'expression null))])
|
||||
(m))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -4817,6 +4817,7 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
} else {
|
||||
if (!rec[drec].comp
|
||||
&& (rec[drec].depth == -2) /* local-expand */
|
||||
&& SAME_OBJ(var, normal)
|
||||
&& SAME_OBJ(SCHEME_STX_VAL(stx), top_symbol)) {
|
||||
rec[drec].pre_unwrapped = 1;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user