From 86922fcd9d2323fed95c08fcdaf4e844bac8dd97 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 8 Apr 2018 09:45:53 -0700 Subject: 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. --- eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3