From 8c82a7b1b39fd1d41e8209f9475141550d790724 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 24 Feb 2021 21:10:05 -0800 Subject: 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. --- 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 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)) -- cgit v1.2.3