mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
Don't warn on import redefining an undefined value.
This commit is contained in:
parent
f9d73ddc30
commit
39eba86d49
1 changed files with 3 additions and 1 deletions
4
eval.c
4
eval.c
|
@ -2314,7 +2314,9 @@ sexp sexp_env_import_op (sexp ctx, sexp self, sexp_sint_t n, sexp to, sexp from,
|
|||
sexp_env_define(ctx, to, newname, sexp_cdr(value));
|
||||
#endif
|
||||
#if SEXP_USE_WARN_UNDEFS
|
||||
if (oldcell && !sexp_same_bindingp(oldcell, value))
|
||||
if (oldcell
|
||||
&& sexp_cdr(oldcell) != SEXP_UNDEF
|
||||
&& !sexp_same_bindingp(oldcell, value))
|
||||
sexp_warn(ctx, "importing already defined binding: ", newname);
|
||||
} else {
|
||||
sexp_warn(ctx, "importing undefined variable: ", oldname);
|
||||
|
|
Loading…
Add table
Reference in a new issue