1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Fix a bug in the (ice-9 match) test

* testsuite/t-match.scm (matches?): Fix match invocation. As far as I can
  tell, although (ice-9 match) does advertise a => form of clauses, it
  requires that the end of the => be a symbol. For some reason this
  works in the interpreter:

    ((lambda () (begin => #t)))

  It's part of the expansion of matches?. It also worked in the old
  compiler. Thinking that maybe toplevel references could cause side
  effects, I made the new compiler actually ref =>, which brought this to
  light.
This commit is contained in:
Andy Wingo 2009-05-20 17:28:59 +02:00
parent ad9b8c451b
commit 9806a548fe

View file

@ -12,7 +12,7 @@
(define (matches? obj)
; (format #t "matches? ~a~%" obj)
(match obj
(($ stuff) => #t)
(($ stuff) #t)
; (blurps #t)
("hello" #t)
(else #f)))