add forgotten piece to the opt/c -> fix
This commit is contained in:
parent
4da6b0904e
commit
2decc99b26
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user