Fix bug in match reported by jay.
svn: r18563
This commit is contained in:
parent
06f25d1359
commit
e1eb4a4b93
|
@ -206,7 +206,7 @@
|
|||
#:when (for/and ([seen-var seen])
|
||||
(not (free-identifier=? bv (car seen-var)))))
|
||||
bv)])
|
||||
(with-syntax ([(success? var ...) (append (generate-temporaries '(success?)) vars)])
|
||||
(with-syntax ([(esc* success? var ...) (append (generate-temporaries '(esc* success?)) vars)])
|
||||
;; do the or matching, and bind the results to the appropriate
|
||||
;; variables
|
||||
#`(let ([esc* (lambda () (values #f #,@(for/list ([v vars]) #'#f)))])
|
||||
|
|
|
@ -633,5 +633,15 @@
|
|||
(match (make-pose 1 2 3)
|
||||
[(struct pose (x y a)) "Gotcha!"]
|
||||
[else "Epic fail!"])))
|
||||
|
||||
(comp #f
|
||||
(match (list 'a 'b 'c)
|
||||
[(or (list a b)
|
||||
(and (app (lambda _ #f) b)
|
||||
(or (and (app (lambda _ #f) a)
|
||||
(list))
|
||||
(list a))))
|
||||
#t]
|
||||
[_ #f]))
|
||||
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue
Block a user