From 19a86d850a72ff2eda7801c8999a391d4308971a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 27 Jan 2021 22:31:48 -0800 Subject: matcher: smallest fix for broken test case found. * share/txr/stdlib/match.tl (compile-atom-match): Do not express the match for the atom via test-expr. That is too late. It needs to be a guard in the guard chain. --- share/txr/stdlib/match.tl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/txr/stdlib/match.tl b/share/txr/stdlib/match.tl index 8c7a245a..e44e7e64 100644 --- a/share/txr/stdlib/match.tl +++ b/share/txr/stdlib/match.tl @@ -179,7 +179,9 @@ (new compiled-match pattern atom obj-var obj-var - test-expr ^(equal ,obj-var ',atom)))) + guard-chain (list (new match-guard + guard-expr ^(equal ,obj-var ',atom))) + test-expr t))) (typecase atom (vec (if (non-triv-pat-p atom) (compile-vec-match atom obj-var var-list) -- cgit v1.2.3