warn variable redefinition in macroexpansion level
This commit is contained in:
parent
d74b82b1a5
commit
fd0553ac25
|
@ -497,6 +497,9 @@ macroexpand(pic_state *pic, pic_value expr, struct pic_senv *senv)
|
|||
pic_error(pic, "binding to non-symbol object");
|
||||
}
|
||||
uniq = pic_gensym(pic, pic_sym(var));
|
||||
if (xh_get_int(senv->tbl, pic_sym(var)) != NULL) {
|
||||
pic_warn(pic, "redefining variable");
|
||||
}
|
||||
xh_put_int(senv->tbl, pic_sym(var), (int)uniq);
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
|
Loading…
Reference in New Issue