From 9f8ae9d1de7988299fccb9a6e2673bf147c6d9eb Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 22 Jul 2022 12:00:46 -0700 Subject: Fix a bug in matching record types. Running the record matcher has a side-effect (raising *no-match*), so we call it ahead of time to ensure a consistent order of evaluation. --- csc/match-test.csc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'csc/match-test.csc') diff --git a/csc/match-test.csc b/csc/match-test.csc index d4da153..bcd0d35 100644 --- a/csc/match-test.csc +++ b/csc/match-test.csc @@ -101,3 +101,11 @@ 2 (match (make-test-record-type 1 2 3) ((% %test-record-type a b c) b)))) + + +(test match-record-type-any + (assert-equal + #t + (match '(1 2 3) + ((% %test-record-type . _) #f) + ((! '(1 2 3)) #t)))) -- cgit v1.3.1