diff --git a/typed-racket-lib/typed-racket/private/parse-type.rkt b/typed-racket-lib/typed-racket/private/parse-type.rkt index 913e3970..44ca5fdf 100644 --- a/typed-racket-lib/typed-racket/private/parse-type.rkt +++ b/typed-racket-lib/typed-racket/private/parse-type.rkt @@ -689,10 +689,10 @@ (define merged-augments (merge-clause super-augments augments)) ;; make sure augments and methods are disjoint - (define maybe-dup-method (check-duplicate (dict-keys merged-methods))) + (define maybe-dup-method (check-duplicates (dict-keys merged-methods))) (when maybe-dup-method (parse-error "duplicate method name" "name" maybe-dup-method)) - (define maybe-dup-augment (check-duplicate (dict-keys merged-augments))) + (define maybe-dup-augment (check-duplicates (dict-keys merged-augments))) (when maybe-dup-augment (parse-error "duplicate augmentable method name" "name" maybe-dup-augment)) diff --git a/typed-racket-lib/typed-racket/private/type-contract.rkt b/typed-racket-lib/typed-racket/private/type-contract.rkt index e76f3deb..1609ae74 100644 --- a/typed-racket-lib/typed-racket/private/type-contract.rkt +++ b/typed-racket-lib/typed-racket/private/type-contract.rkt @@ -642,7 +642,7 @@ (for/list ([t arrs]) (match t [(arr: dom _ _ _ _) (length dom)]))) - (define maybe-dup (check-duplicate arities)) + (define maybe-dup (check-duplicates arities)) (when maybe-dup (fail #:reason (~a "function type has two cases of arity " maybe-dup))) (if (= (length arrs) 1) diff --git a/typed-racket-lib/typed-racket/types/classes.rkt b/typed-racket-lib/typed-racket/types/classes.rkt index 6570f3da..e0f0fa8a 100644 --- a/typed-racket-lib/typed-racket/types/classes.rkt +++ b/typed-racket-lib/typed-racket/types/classes.rkt @@ -60,14 +60,14 @@ #:attr all-init-names (append (attribute init-field-names) (attribute init-names)) #:fail-when - (check-duplicate (attribute all-init-names)) + (check-duplicates (attribute all-init-names)) "duplicate init or init-field clause" #:fail-when - (check-duplicate (attribute all-field-names)) + (check-duplicates (attribute all-field-names)) "duplicate field or init-field clause" #:fail-when - (check-duplicate (append (attribute method-names) - (attribute augment-names))) + (check-duplicates (append (attribute method-names) + (attribute augment-names))) "duplicate method or augmentable method clause" #:attr constraints (list (attribute all-init-names) @@ -115,14 +115,14 @@ (attribute augments) (attribute init-rest)) #:fail-when - (check-duplicate (map first (attribute inits))) + (check-duplicates (map first (attribute inits))) "duplicate init or init-field clause" #:fail-when - (check-duplicate (map first (attribute fields))) + (check-duplicates (map first (attribute fields))) "duplicate field or init-field clause" #:fail-when - (check-duplicate (map first (append (attribute methods) - (attribute augments)))) + (check-duplicates (map first (append (attribute methods) + (attribute augments)))) "duplicate method or augmentable method clause")) ;; Type -> RowConstraint @@ -228,16 +228,16 @@ (parse-type (attribute init-rest-type))) #:with implements #'(implements-id ...) #:fail-when - (check-duplicate (map first (attribute inits))) + (check-duplicates (map first (attribute inits))) "duplicate init or init-field clause" #:fail-when - (check-duplicate (map first (attribute fields))) + (check-duplicates (map first (attribute fields))) "duplicate field or init-field clause" #:fail-when - (check-duplicate (map first (attribute methods))) + (check-duplicates (map first (attribute methods))) "duplicate method clause" #:fail-when - (check-duplicate (map first (attribute augments))) + (check-duplicates (map first (attribute augments))) "duplicate augment clause")) ;; Stx Stx Listof (Stx -> Type) -> Listof<(List Symbol Type Boolean)> diff --git a/typed-racket-test/unit-tests/tooltip-tests.rkt b/typed-racket-test/unit-tests/tooltip-tests.rkt index 17a845f7..9da37ba2 100644 --- a/typed-racket-test/unit-tests/tooltip-tests.rkt +++ b/typed-racket-test/unit-tests/tooltip-tests.rkt @@ -85,7 +85,7 @@ (for/list ([tooltip (in-list tooltips)]) (match-define (vector _ start end _) tooltip) (list start end))) - (if (check-duplicate locations) + (if (check-duplicates locations) 'duplicate-tooltips #t))