diff --git a/collects/racket/contract/private/arr-i-parse.rkt b/collects/racket/contract/private/arr-i-parse.rkt index 25ef05c1d9..8c93717ad1 100644 --- a/collects/racket/contract/private/arr-i-parse.rkt +++ b/collects/racket/contract/private/arr-i-parse.rkt @@ -344,8 +344,8 @@ code does the parsing and validation of the syntax. (for-each (λ (x) (check-id stx x)) (syntax->list #'(id2 ...))) (values (arg/res #'id - (syntax->list #'(id2 ...)) - #'rest-expr) + (syntax->list #'(id2 ...)) + #'rest-expr) #'leftover))] [(#:rest other . leftover) (raise-syntax-error #f "expected an id+ctc" @@ -398,12 +398,6 @@ code does the parsing and validation of the syntax. [_ (raise-syntax-error #f "bad syntax" stx)]))) -;(define (ensure-no-cycles istx) -; (let (;; cm : id -o> {'pending, 'no-cycle} -; [cm (make-free-identifier-map)]) -; (for ([dom (in-list (istx-args istx))]) -; (let loop ([id ( - (provide parse-->i (struct-out istx) diff --git a/collects/racket/contract/private/arr-i.rkt b/collects/racket/contract/private/arr-i.rkt index fbbf1722ee..5918f0fa23 100644 --- a/collects/racket/contract/private/arr-i.rkt +++ b/collects/racket/contract/private/arr-i.rkt @@ -745,7 +745,7 @@ #,(if (istx-rst an-istx) (if (arg/res-vars (istx-rst an-istx)) `(dep ,(syntax-e (arg/res-var (istx-rst an-istx))) - ,(syntax-e (arg/res-vars (istx-rst an-istx)))) + ,(map syntax-e (arg/res-vars (istx-rst an-istx)))) `(nodep ,(syntax-e (arg/res-var (istx-rst an-istx))))) #f) #,(and (istx-pre an-istx) (map syntax-e (pre/post-vars (istx-pre an-istx)))) diff --git a/collects/tests/racket/contract-test.rktl b/collects/tests/racket/contract-test.rktl index 71feaaa452..34221d1572 100644 --- a/collects/tests/racket/contract-test.rktl +++ b/collects/tests/racket/contract-test.rktl @@ -2161,6 +2161,33 @@ 'neg) m 1) 1) + + (test/spec-passed/result + '->i28 + '((contract (->i ([x real?]) + #:rest [rest (x) (listof (>=/c x))] + any) + (λ (x . rest) + (cons x rest)) + 'pos + 'neg) + 1 + 2 + 3) + '(1 2 3)) + + (test/neg-blame + '->i29 + '((contract (->i ([x real?]) + #:rest [rest (x) (listof (>=/c x))] + any) + (λ (x . rest) + (cons x rest)) + 'pos + 'neg) + 1 + -2 + -3)) (test/spec-passed '->i-any1