From df9cd3342a9be05bc1f9744494f790fad449b00f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 27 Mar 2015 07:41:23 -0500 Subject: [PATCH] check duplicate identifiers in parametric->/c closes PR 15017 --- racket/collects/racket/contract/private/parametric.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/racket/collects/racket/contract/private/parametric.rkt b/racket/collects/racket/contract/private/parametric.rkt index 1c1266a084..c789f44c76 100644 --- a/racket/collects/racket/contract/private/parametric.rkt +++ b/racket/collects/racket/contract/private/parametric.rkt @@ -16,6 +16,12 @@ "expected an identifier" stx x))) + (define dup (check-duplicate-identifier (syntax->list #'(x ...)))) + (when dup (raise-syntax-error + 'parametric->/c + "duplicate identifier" + stx + dup)) #`(make-polymorphic-contract opaque/c '(x ...) (lambda (x ...) c)