fix ->m for keyword arguments

closes PR 13674
This commit is contained in:
Robby Findler 2013-04-07 19:38:12 -05:00
parent 0cb85a85a1
commit 6f7c938c0b
2 changed files with 16 additions and 2 deletions

View File

@ -293,8 +293,8 @@ v4 todo:
(tx s)))]) (tx s)))])
(with-syntax ([kwd-lam-params (with-syntax ([kwd-lam-params
(if dom-rest (if dom-rest
#'(dom-x ... [opt-dom-x unspecified-dom] ... kwd-param ... . rest-x) #'(this-param ... dom-x ... [opt-dom-x unspecified-dom] ... kwd-param ... . rest-x)
#'(dom-x ... [opt-dom-x unspecified-dom] ... kwd-param ...))] #'(this-param ... dom-x ... [opt-dom-x unspecified-dom] ... kwd-param ...))]
[basic-return [basic-return
(let ([inner-stx-gen (let ([inner-stx-gen
(if need-apply-values? (if need-apply-values?

View File

@ -8568,6 +8568,20 @@
'pos 'pos
'neg)) 'neg))
(test/spec-passed
'->m-kwd-first-order-1
'(contract (class/c [m (->m #:x number? number?)])
(class object% (super-new) (define/public (m #:x x) x))
'pos
'neg))
(test/pos-blame
'->m-kwd-first-order-2
'(contract (class/c [m (->m #:y number? number?)])
(class object% (super-new) (define/public (m #:x x) x))
'pos
'neg))
(test/spec-passed (test/spec-passed
'->*m-first-order-1 '->*m-first-order-1
'(contract (class/c [m (->*m (number?) (string?) number?)]) '(contract (class/c [m (->*m (number?) (string?) number?)])