fix namespace-anchor on non-module namespaces

This commit is contained in:
Matthew Flatt 2010-12-01 06:51:43 -07:00
parent 5e5678b29d
commit 082515d6db
2 changed files with 7 additions and 1 deletions

View File

@ -162,4 +162,10 @@
;; ---------------------------------------- ;; ----------------------------------------
(parameterize ([current-namespace (make-base-namespace)])
(eval '(define-namespace-anchor anchor))
(test 1 eval '(eval 1 (namespace-anchor->namespace anchor))))
;; ----------------------------------------
(report-errs) (report-errs)

View File

@ -4578,7 +4578,7 @@ static Scheme_Object *do_variable_namespace(const char *who, int tl, int argc, S
return scheme_make_integer(ph); return scheme_make_integer(ph);
} else if (tl) { } else if (tl) {
/* return env directly; need to set up */ /* return env directly; need to set up */
if (!env->phase) if (!env->phase && env->module)
scheme_prep_namespace_rename(env); scheme_prep_namespace_rename(env);
} else { } else {
/* new namespace: */ /* new namespace: */