Fixes matching of prefab struct literals
Fixes PR 12298
This commit is contained in:
parent
4a3997ac1c
commit
57a8ed5c79
|
@ -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))))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user