Fixes matching of prefab struct literals

Fixes PR 12298
This commit is contained in:
Casey Klein 2011-10-17 19:37:16 -05:00
parent 4a3997ac1c
commit 57a8ed5c79
2 changed files with 3 additions and 1 deletions

View File

@ -780,7 +780,7 @@ before the pattern compiler is invoked.
[else
(values
(lambda (exp hole-info)
(and (eqv? pattern exp)
(and (equal? pattern exp)
(list (make-mtch (make-bindings null)
(build-flat-context exp)
none))))

View File

@ -31,6 +31,8 @@
(test-empty "a" '(x) #f)
(test-empty "a" '() #f)
(test-empty "a" "a" (list (make-test-mtch (make-bindings null) "a" none)))
(test-empty #s(x 1) #s(x 1) (list (make-test-mtch (make-bindings null) #s(x 1) none)))
(test-empty #s(x 1) #s(x 2) #f)
(test-empty 'number 1 (list (make-test-mtch (make-bindings (list (make-bind 'number 1))) 1 none)))
(test-empty 'number 'x #f)
(test-empty 'number '() #f)