summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-21 19:14:28 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-21 19:14:28 -0700
commit2480aea51560801f436823c53dc408a7333f683b (patch)
tree8b29d88dfd07ddf08efd885ee607f3f243b2d8b7 /share
parent9b8fce5acc9f27866b29ececbece109bbdef01f0 (diff)
downloadtxr-2480aea51560801f436823c53dc408a7333f683b.tar.gz
txr-2480aea51560801f436823c53dc408a7333f683b.tar.bz2
txr-2480aea51560801f436823c53dc408a7333f683b.zip
compiler: bug: const-folded (call ...) not quoted.
* share/txr/stdlib/compiler.tl (comp-apply-call): When a call expression is evaluated at compile time, we must quote the result, because it could be a non-self-evaluating symbol, or list.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/compiler.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 127d68af..990395cb 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1383,7 +1383,7 @@
(let ((op (eval (car args))))
(or [%const-foldable% op]
(not (bindable op)))))
- me.(compile oreg env (eval form)))
+ me.(compile oreg env ^(quote ,(eval form))))
(t (tree-case (car args)
((op arg . more)
(caseq op