fix a bug in `free-identifier=?'
The bug is related to macro-introduced `require' and rename on export.
This commit is contained in:
parent
f852b9eb92
commit
08c659c5d5
|
@ -1637,6 +1637,28 @@
|
||||||
f-id
|
f-id
|
||||||
(eval '(extract f f2 f2 #t))))
|
(eval '(extract f f2 f2 #t))))
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Check interaction of marks, `rename-out', and `free-identifier=?'
|
||||||
|
|
||||||
|
(module check-free-eq-with-rename racket/base
|
||||||
|
(require (for-syntax racket/base))
|
||||||
|
(provide (rename-out [prefix:quote quote])
|
||||||
|
check)
|
||||||
|
(define-syntax (check stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ id) #`#,(free-identifier=? #'id #'prefix:quote)]))
|
||||||
|
(define-syntax-rule (prefix:quote x) (quote x)))
|
||||||
|
|
||||||
|
(module use-rename-checker racket/base
|
||||||
|
(define-syntax-rule (body)
|
||||||
|
(begin
|
||||||
|
(provide v)
|
||||||
|
(require 'check-free-eq-with-rename)
|
||||||
|
(define v (check quote))))
|
||||||
|
(body))
|
||||||
|
|
||||||
|
(test #t dynamic-require ''use-rename-checker 'v)
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -4549,7 +4549,12 @@ static Scheme_Object *get_module_src_name(Scheme_Object *a, Scheme_Object *orig_
|
||||||
if (SCHEME_FALSEP(bdg))
|
if (SCHEME_FALSEP(bdg))
|
||||||
bdg = get_old_module_env(a);
|
bdg = get_old_module_env(a);
|
||||||
}
|
}
|
||||||
result = search_shared_pes(mrn->shared_pes, glob_id, a, bdg, NULL, 1, 0, NULL);
|
rename = search_shared_pes(mrn->shared_pes, glob_id, a, bdg, NULL, 1, 0, NULL);
|
||||||
|
if (rename) {
|
||||||
|
if (mrn->kind == mzMOD_RENAME_MARKED)
|
||||||
|
skip_other_mods = 1;
|
||||||
|
result = rename;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* match; set result: */
|
/* match; set result: */
|
||||||
if (mrn->kind == mzMOD_RENAME_MARKED)
|
if (mrn->kind == mzMOD_RENAME_MARKED)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user