add forgotten piece to the opt/c -> fix

This commit is contained in:
Robby Findler 2013-04-09 22:22:13 -05:00
parent 4da6b0904e
commit 2decc99b26
2 changed files with 35 additions and 1 deletions

View File

@ -633,7 +633,17 @@
(chaperone-procedure
val
(make-keyword-procedure
(λ (kwds kwd-args . regular-args) (raise-blame-error '...))
(λ (kwds kwd-args . regular-args)
(raise-blame-error (blame-swap blame)
val
'(expected: "no keyword arguments" given: "~a")
(apply string-append
(let loop ([kwds kwds])
(cons
(format "~a" (car kwds))
(cond
[(null? (cdr kwds)) '()]
[else (cons " " (loop (cdr kwds)))]))))))
exact-proc)))
(define (raise-flat-arrow-err blame val n)

View File

@ -1120,6 +1120,30 @@
'pos
'neg)
1))
(test/neg-blame
'contract-arrow-keyword17
'((contract (-> integer? integer?)
(λ (x #:y [y #f]) x)
'pos
'neg)
#f))
(test/pos-blame
'contract-arrow-keyword18
'((contract (-> integer? integer?)
(λ (x #:y [y #f]) y)
'pos
'neg)
1))
(test/neg-blame
'contract-arrow-keyword19
'((contract (-> boolean?)
(λ (#:x [x #f]) x)
'pos
'neg)
#:x 1))
(test/spec-passed
'contract-arrow1