fix the obvious bug wrt to procedures returned from make-keyword-procedure, but something is still wrong
related to PR 11833
This commit is contained in:
parent
c677932baf
commit
b926b17d7e
|
@ -1866,8 +1866,9 @@ v4 todo:
|
|||
(define (keywords-match mandatory-kwds optional-kwds val)
|
||||
(let-values ([(proc-mandatory proc-all) (procedure-keywords val)])
|
||||
(and ;; proc accepts all ctc's mandatory keywords
|
||||
(andmap (λ (kwd) (member kwd proc-all))
|
||||
mandatory-kwds)
|
||||
(or (not proc-all)
|
||||
(andmap (λ (kwd) (member kwd proc-all))
|
||||
mandatory-kwds))
|
||||
;; proc's mandatory keywords are still mandatory in ctc
|
||||
(andmap (λ (kwd) (member kwd mandatory-kwds))
|
||||
proc-mandatory)
|
||||
|
|
|
@ -1070,6 +1070,18 @@
|
|||
'contract-arrow-any3
|
||||
'((contract (integer? . -> . any) (lambda (x) #f) 'pos 'neg) #t))
|
||||
|
||||
(test/spec-passed
|
||||
'contract-arrow-all-kwds
|
||||
'(contract (-> #:a string? string?)
|
||||
(make-keyword-procedure void)
|
||||
'pos 'neg))
|
||||
|
||||
(test/spec-passed
|
||||
'contract-arrow-all-kwds2
|
||||
'((contract (-> #:a string? void?)
|
||||
(make-keyword-procedure void)
|
||||
'pos 'neg)
|
||||
#:a "abcdef"))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user