fix for-label import of a submodule

Closes PR 14155

Merge to v6.0
This commit is contained in:
Matthew Flatt 2013-12-14 20:21:04 -07:00
parent 2199d96100
commit 80d0b2fcc3
2 changed files with 8 additions and 0 deletions

View File

@ -877,6 +877,13 @@
(module m (submod ".." n))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check submodule and `for-label`
(module requires-submodule-for-label racket/base
(module foo racket/base)
(require (for-label (submod "." foo))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(report-errs)

View File

@ -928,6 +928,7 @@ scheme_new_module_env(Scheme_Env *env, Scheme_Module *m, int new_exp_module_tree
scheme_prepare_label_env(env);
menv->label_env = env->label_env;
menv->label_env->module_pre_registry = menv->module_pre_registry;
menv->instance_env = env;
if (new_exp_module_tree) {