check-duplicate -> check-duplicates
This commit is contained in:
parent
9abb1927ee
commit
f35b5a9182
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<Boolean> (Stx -> Type) -> Listof<(List Symbol Type Boolean)>
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user