Make `defproc' throw an error if two arguments have the same name.
Related to the already fixed PR 12114 and PR 12133, which motivated the error, and a few additional typos of the same kind. (Note that it uses the symbols, but that's how they'll render anyway.) original commit: 16cd1ad78d6495816a4869621154024652fd8da0
This commit is contained in:
parent
240449694b
commit
867af4149a
|
@ -238,6 +238,10 @@
|
|||
(if (symbol? (car p)) (car p) (loop (car p)))))
|
||||
(define (do-one stx-id prototype args arg-contracts arg-vals result-contract
|
||||
first?)
|
||||
(let ([names (remq* '(... ...+) (map arg-id args))])
|
||||
(unless (= (length names) (length (remove-duplicates names eq?)))
|
||||
(error 'defproc "duplicate argument names in prototype for ~s: ~s"
|
||||
(syntax->datum stx-id) names)))
|
||||
(define tagged
|
||||
(cond
|
||||
[(eq? mode 'new)
|
||||
|
|
|
@ -207,7 +207,7 @@ formats to the current one.}
|
|||
[alt-path path-string?] [alt-anchor string?]) redirect-target-element?]
|
||||
@defproc[(make-link-element [style any/c] [content list?] [tag tag?]) link-element?]
|
||||
@defproc[(make-index-element [style any/c] [content list?] [tag tag?]
|
||||
[tag tag?] [plain-seq (and/c pair? (listof string?))]
|
||||
[plain-seq (and/c pair? (listof string?))]
|
||||
[entry-seq list?] [desc any/c]) index-element?]
|
||||
)]{
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user