fix (-> any/c boolean?) for the case of an impersonated struct predicate
closes #1129
This commit is contained in:
parent
54be64ad31
commit
3d31d86bf5
|
@ -386,6 +386,13 @@
|
|||
(test/pos-blame
|
||||
'predicate/c13
|
||||
'(contract (-> any/c boolean?) (λ (x #:y y) #t) 'pos 'neg))
|
||||
(test/pos-blame
|
||||
'predicate/c14
|
||||
'(contract (-> any/c boolean?)
|
||||
(let ()
|
||||
(struct s ())
|
||||
((impersonate-procedure s? (λ (x) (values (λ (r) "") x))) 11))
|
||||
'pos 'neg))
|
||||
|
||||
;; this test ensures that no contract wrappers
|
||||
;; are created for struct predicates
|
||||
|
|
|
@ -1289,7 +1289,9 @@
|
|||
given: "~e")
|
||||
f))
|
||||
(cond
|
||||
[(struct-predicate-procedure? f) #f]
|
||||
[(and (struct-predicate-procedure? f)
|
||||
(not (impersonator? f)))
|
||||
#f]
|
||||
[(and (equal? (procedure-arity f) 1)
|
||||
(let-values ([(required mandatory) (procedure-keywords f)])
|
||||
(and (null? required)
|
||||
|
|
Loading…
Reference in New Issue
Block a user