fix a quoting error

related to PR 13716
This commit is contained in:
Robby Findler 2013-04-27 20:40:42 -05:00
parent 07fd08ecc3
commit 10ac122111
2 changed files with 14 additions and 2 deletions

View File

@ -209,7 +209,7 @@
v] v]
[else [else
(unless (pred? v) (unless (pred? v)
(raise-blame-error blame v '(expected: "~a" given: "~e") (raise-blame-error blame v '(expected: "~a?" given: "~e")
(base-struct/dc-struct-name ctc) (base-struct/dc-struct-name ctc)
v)) v))
(let loop ([subcontracts (base-struct/dc-subcontracts ctc)] (let loop ([subcontracts (base-struct/dc-subcontracts ctc)]
@ -815,7 +815,7 @@
#`(build-struct/dc (list #,@structs) #`(build-struct/dc (list #,@structs)
#,(list-ref info 2) #,(list-ref info 2)
'struct-id '#,struct-id
(quote-module-name) (quote-module-name)
'#,struct-id '#,struct-id
#,struct/c?)) #,struct/c?))

View File

@ -9921,6 +9921,18 @@
((flat-contract-predicate (struct/c doll 'center)) (doll 'not-center-center)))) ((flat-contract-predicate (struct/c doll 'center)) (doll 'not-center-center))))
'(#t #f)) '(#t #f))
(contract-error-test
'struct/c17
#'(let ()
(struct foo (v))
(contract (struct/c foo number?)
#f
'pos
'neg))
(λ (x)
(and (exn:fail:contract:blame? x)
(regexp-match #rx"promised: foo?" (exn-message x)))))
; ;
; ;