From 29e448c01f92b1fe54511bdaf5564c774a91cb09 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 13 Jan 2017 22:34:45 -0800 Subject: bugfix: diagnose dotted form calls consistently. * eval.c (do_expand): Warn about unbound functions or non-bindable symbols in function position regardless whether the form is a dotted form that was subject to the apply transformation. --- eval.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eval.c b/eval.c index 38ba9738..c203186d 100644 --- a/eval.c +++ b/eval.c @@ -4079,22 +4079,22 @@ static val do_expand(val form, val menv) not_bindable_warning(form, car(args)); } - if (form_ex == form && args_ex == args) { - if (!lookup_fun(menv, sym) && !special_operator_p(sym)) { - if (!bindable(sym_ex)) - eval_warn(last_form_expanded, - lit("~s appears in operator position"), sym, nao); - else - eval_defr_warn(last_form_expanded, - cons(fun_s, sym), - lit("unbound function ~s"), - sym, nao); - } - return form; + if (!lookup_fun(menv, sym) && !special_operator_p(sym)) { + if (!bindable(sym)) + eval_warn(last_form_expanded, + lit("~s appears in operator position"), sym, nao); + else + eval_defr_warn(last_form_expanded, + cons(fun_s, sym), + lit("unbound function ~s"), + sym, nao); } - if (args_ex == args) + if (args_ex == args) { + if (form_ex == form) + return form; return form_ex; + } return rlcp(cons(sym_ex, args_ex), form); } -- cgit v1.2.3