From bf04eaba827dad559b85c36d38a180462f69578b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 21 Apr 2021 19:14:28 -0700 Subject: 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. --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3