diff --git a/collects/redex/private/matcher-test.ss b/collects/redex/private/matcher-test.ss index 38360fbb7f..eb7f8d86d6 100644 --- a/collects/redex/private/matcher-test.ss +++ b/collects/redex/private/matcher-test.ss @@ -442,6 +442,11 @@ '(+ 1 b) #f) + (test-empty `(side-condition ((any_1 ..._a) (any_2 ..._a)) + ,(lambda (bindings) (error 'should-not-be-called))) + '((1 2 3) (4 5)) + #f) + (test-xab 'exp_1 '(+ 1 2) (list (make-test-mtch (make-bindings (list (make-bind 'exp_1 '(+ 1 2)))) '(+ 1 2) none))) diff --git a/collects/redex/private/matcher.ss b/collects/redex/private/matcher.ss index b6abf4dcff..09fd40f5a7 100644 --- a/collects/redex/private/matcher.ss +++ b/collects/redex/private/matcher.ss @@ -758,7 +758,8 @@ before the pattern compiler is invoked. (lambda (exp hole-info) (let ([matches (match-pat exp hole-info)]) (and matches - (let ([filtered (filter (λ (m) (condition (mtch-bindings m))) matches)]) + (let ([filtered (filter (λ (m) (condition (mtch-bindings m))) + (filter-multiples matches))]) (if (null? filtered) #f filtered)))))