From b5d486a7ce3f9cfe9a98afe4e5871512068936a9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 Feb 2021 19:37:35 -0800 Subject: matcher: lambda-match: bug: wrong variable tested. * share/txr/stdlib/match.tl (expand-lambda-match): The matched-p-temp variable must be tested for each clause, not result-temp. The result of a matching clause could be nil. --- share/txr/stdlib/match.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/txr/stdlib/match.tl b/share/txr/stdlib/match.tl index f68a542e..70f19665 100644 --- a/share/txr/stdlib/match.tl +++ b/share/txr/stdlib/match.tl @@ -661,7 +661,7 @@ (set exp ^(unless ,rest-temp ,exp))) (unless (zerop counter) - (set exp ^(unless ,result-temp ,exp))) + (set exp ^(unless ,matched-p-temp ,exp))) exp)))) ^(lambda (,*fix-arg-temps ,*(if opt-arg-temps -- cgit v1.2.3