parent
5db75a92ae
commit
53ef242889
|
@ -773,6 +773,16 @@
|
||||||
(test (list the-a the-b) the-b)
|
(test (list the-a the-b) the-b)
|
||||||
(test 0 procedure-arity the-b))
|
(test 0 procedure-arity the-b))
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
;; Make sure wrong number with keywords is an arity exception:
|
||||||
|
|
||||||
|
(let ()
|
||||||
|
(define (hello a b #:key key) (display a))
|
||||||
|
(test #t
|
||||||
|
exn:fail:contract:arity?
|
||||||
|
(with-handlers ([values values])
|
||||||
|
(hello 1 #:key 'hi))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -1578,7 +1578,7 @@
|
||||||
(object-name p)
|
(object-name p)
|
||||||
p))])
|
p))])
|
||||||
(raise
|
(raise
|
||||||
(exn:fail:contract
|
((if (or extra-kw missing-kw) exn:fail:contract exn:fail:contract:arity)
|
||||||
(if extra-kw
|
(if extra-kw
|
||||||
(if (keyword-procedure? p)
|
(if (keyword-procedure? p)
|
||||||
(format
|
(format
|
||||||
|
|
Loading…
Reference in New Issue
Block a user