fix a problem with the "self" module path index
This bug was introduced recently by changes to support submodules. Closes PR 12744 (and Robby had reported it earlier)
This commit is contained in:
parent
be49a59e4d
commit
4ac4e2e8d6
|
@ -685,6 +685,24 @@
|
|||
|
||||
(q go))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Check modidx for 'origin items
|
||||
|
||||
(syntax-case (parameterize ([current-namespace (make-base-namespace)])
|
||||
(expand
|
||||
'(module m racket/base
|
||||
(define-syntax-rule (m x) 1)
|
||||
(m x)))) ()
|
||||
[(_ name lang (mb ds (app cwv (lam () (qt one)) pnt)))
|
||||
(begin
|
||||
(test 1 syntax-e #'one)
|
||||
(test #t identifier? (car (syntax-property #'one 'origin)))
|
||||
(test #t symbol?
|
||||
(resolved-module-path-name
|
||||
(module-path-index-resolve
|
||||
(car (identifier-binding (car (syntax-property #'one 'origin))))))))])
|
||||
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -6862,7 +6862,10 @@ static Scheme_Object *do_module(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
fm = scheme_stx_phase_shift(fm, NULL, self_modidx, this_empty_self_modidx, NULL, NULL);
|
||||
|
||||
/* make self_modidx like the empty modidx */
|
||||
((Scheme_Modidx *)self_modidx)->resolved = ((Scheme_Modidx *)this_empty_self_modidx)->resolved;
|
||||
if (SAME_OBJ(this_empty_self_modidx, empty_self_modidx))
|
||||
((Scheme_Modidx *)self_modidx)->resolved = empty_self_modname;
|
||||
else
|
||||
((Scheme_Modidx *)self_modidx)->resolved = ((Scheme_Modidx *)this_empty_self_modidx)->resolved;
|
||||
}
|
||||
|
||||
if (rec[drec].comp || (rec[drec].depth != -2)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user