Check struct predicate before checking fields.
This commit is contained in:
parent
365a1275ce
commit
3b0de9c141
|
@ -196,6 +196,8 @@
|
|||
#:projection
|
||||
(lambda (blame)
|
||||
(lambda (val)
|
||||
(unless (#,pred? val)
|
||||
(raise-blame-error blame val "expected ~a value, got ~v" 'cnt-name val))
|
||||
(maker fld-cnts ...))))])
|
||||
rec))]
|
||||
[else #`(flat-named-contract '#,(syntax-e pred?) #,(cert pred?))])]
|
||||
|
|
Loading…
Reference in New Issue
Block a user