From e3ac780998d8b32d5c10d7aebcca88af7c82b80e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 3 Feb 2017 10:18:15 -0800 Subject: When expanding sys:lisp1-value, check for bad form. * eval.c (expand_lisp1_value): If the first argument is an object other than a bindable symbol, throw an error. --- eval.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index e1431fdf..15adbcaa 100644 --- a/eval.c +++ b/eval.c @@ -2077,8 +2077,12 @@ static val expand_lisp1_value(val form, val menv) val sym = second(form); val binding_type = lexical_lisp1_binding(menv, sym); - if (nilp(binding_type)) + if (nilp(binding_type)) { + if (!bindable(sym)) + eval_error(form, lit("~s: misapplied to form ~s"), + first(form), sym, nao); return form; + } if (binding_type == var_k) return sym; -- cgit v1.2.3