fixed bug in list/c's first-order checking code
This commit is contained in:
parent
645ca02e92
commit
df504d482e
|
@ -698,7 +698,7 @@
|
||||||
(= (length x) (length (generic-list/c-args c)))
|
(= (length x) (length (generic-list/c-args c)))
|
||||||
(for/and ([arg/c (in-list (generic-list/c-args c))]
|
(for/and ([arg/c (in-list (generic-list/c-args c))]
|
||||||
[v (in-list x)])
|
[v (in-list x)])
|
||||||
(arg/c v))))
|
((contract-first-order arg/c) v))))
|
||||||
|
|
||||||
(struct generic-list/c (args))
|
(struct generic-list/c (args))
|
||||||
|
|
||||||
|
|
|
@ -10453,6 +10453,11 @@ so that propagation occurs.
|
||||||
(ctest #t contract-first-order-passes? (listof integer?) (list 1))
|
(ctest #t contract-first-order-passes? (listof integer?) (list 1))
|
||||||
(ctest #f contract-first-order-passes? (listof integer?) #f)
|
(ctest #f contract-first-order-passes? (listof integer?) #f)
|
||||||
|
|
||||||
|
(ctest #f contract-first-order-passes? (list/c #f #f #t) (list))
|
||||||
|
(ctest #t contract-first-order-passes? (list/c #f 'x #t) (list #f 'x #t))
|
||||||
|
(ctest #f contract-first-order-passes? (list/c (-> number? number?)) (list (λ (x y) x)))
|
||||||
|
(ctest #t contract-first-order-passes? (list/c (-> number? number?)) (list (λ (x) x)))
|
||||||
|
|
||||||
(ctest #t contract-first-order-passes? (non-empty-listof integer?) (list 1))
|
(ctest #t contract-first-order-passes? (non-empty-listof integer?) (list 1))
|
||||||
(ctest #f contract-first-order-passes? (non-empty-listof integer?) (list))
|
(ctest #f contract-first-order-passes? (non-empty-listof integer?) (list))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user