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
|
[else
|
||||||
(values
|
(values
|
||||||
(lambda (exp hole-info)
|
(lambda (exp hole-info)
|
||||||
(and (eqv? pattern exp)
|
(and (equal? pattern exp)
|
||||||
(list (make-mtch (make-bindings null)
|
(list (make-mtch (make-bindings null)
|
||||||
(build-flat-context exp)
|
(build-flat-context exp)
|
||||||
none))))
|
none))))
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
(test-empty "a" '(x) #f)
|
(test-empty "a" '(x) #f)
|
||||||
(test-empty "a" '() #f)
|
(test-empty "a" '() #f)
|
||||||
(test-empty "a" "a" (list (make-test-mtch (make-bindings null) "a" none)))
|
(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 1 (list (make-test-mtch (make-bindings (list (make-bind 'number 1))) 1 none)))
|
||||||
(test-empty 'number 'x #f)
|
(test-empty 'number 'x #f)
|
||||||
(test-empty 'number '() #f)
|
(test-empty 'number '() #f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user