summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-24 21:10:05 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-24 21:10:05 -0800
commit286ecfa6be0d484b2cd13366fd6aac53a54eae4a (patch)
treeca92000d6536dc732b6290d28d5e83d769a7a125
parent4464034b7ccace6152299b746dcc0a964d16ad34 (diff)
downloadtxr-286ecfa6be0d484b2cd13366fd6aac53a54eae4a.tar.gz
txr-286ecfa6be0d484b2cd13366fd6aac53a54eae4a.tar.bz2
txr-286ecfa6be0d484b2cd13366fd6aac53a54eae4a.zip
compiler: bugfix: internal error in sys:switch.
Compiling a form like (caseq op ((a b c d e f g h i j k) 42))) Results in a run-time error in the compiler, similar to: list-vec: (#:l0048) is not of type vec * share/txr/stdlib/compiler.tl (compiler comp-switch): Make sure cases is also still a vector in the complex case when it's not just a copy of cases-vec.
-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 77e4119a..a9dece6e 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -675,7 +675,7 @@
(null d))))
(cases (if shared
(let ((cs-nil ^(,*cs nil)))
- [mapcar ldiff cs-nil (cdr cs-nil)])
+ (vec-list [mapcar ldiff cs-nil (cdr cs-nil)]))
cases-vec))
(lend (gensym "l"))
(clabels (mapcar (ret (gensym "l")) cases))