diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-03 10:18:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-03 10:18:15 -0800 |
commit | e3ac780998d8b32d5c10d7aebcca88af7c82b80e (patch) | |
tree | ef73449fbb7928af06b893601087bc09f84a61b3 | |
parent | f3708a552407c52cd4676b10649ac0d20c8544fd (diff) | |
download | txr-e3ac780998d8b32d5c10d7aebcca88af7c82b80e.tar.gz txr-e3ac780998d8b32d5c10d7aebcca88af7c82b80e.tar.bz2 txr-e3ac780998d8b32d5c10d7aebcca88af7c82b80e.zip |
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.
-rw-r--r-- | eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |