diff --git a/collects/scheme/match/compiler.ss b/collects/scheme/match/compiler.ss index 11d260774b..58a7260617 100644 --- a/collects/scheme/match/compiler.ss +++ b/collects/scheme/match/compiler.ss @@ -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)))]) diff --git a/collects/tests/match/examples.ss b/collects/tests/match/examples.ss index acb752751b..2348230173 100644 --- a/collects/tests/match/examples.ss +++ b/collects/tests/match/examples.ss @@ -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])) ))