check duplicate identifiers in parametric->/c

closes PR 15017
This commit is contained in:
Robby Findler 2015-03-27 07:41:23 -05:00
parent 1a5e3e5953
commit df9cd3342a

View File

@ -16,6 +16,12 @@
"expected an identifier" "expected an identifier"
stx stx
x))) 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 #`(make-polymorphic-contract opaque/c
'(x ...) '(x ...)
(lambda (x ...) c) (lambda (x ...) c)