summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-08 09:45:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-08 09:45:53 -0700
commit86922fcd9d2323fed95c08fcdaf4e844bac8dd97 (patch)
tree380ee3fd0c0ba926dd1d9d5085902c593ee48320
parenta40faa2be6e6c9b5108ef19402334c66541e06be (diff)
downloadtxr-86922fcd9d2323fed95c08fcdaf4e844bac8dd97.tar.gz
txr-86922fcd9d2323fed95c08fcdaf4e844bac8dd97.tar.bz2
txr-86922fcd9d2323fed95c08fcdaf4e844bac8dd97.zip
expander: no dot-to-apply transform on special forms.
* eval.c (do_expand): Do not convert (op arg ... . dot) to (sys:apply (fun op) (sys:l1-value arg) ... dot) if op is a special operator; this is only valid for functions. This issue has been uncovered by new diagnosis of undefined functions in the fun operator.
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index e893aea6..92dd9f39 100644
--- a/eval.c
+++ b/eval.c
@@ -4621,7 +4621,9 @@ again:
/* funtion call expansion also handles: prog1, call, if, and, or,
unwind-protect, return and other special forms whose arguments
are evaluated */
- val form_ex = dot_to_apply(form, nil);
+ val form_ex = if3(special_operator_p(sym),
+ form,
+ dot_to_apply(form, nil));
val insym = first(form_ex);
val insym_ex = insym;
val args = rest(form_ex);