File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 138
138
:protocol-duped-method true
139
139
:protocol-multiple-impls true
140
140
:protocol-with-variadic-method true
141
+ :protocol-impl-with-variadic-method true
141
142
:protocol-impl-recur-with-target true
142
143
:single-segment-namespace true
143
144
:munged-namespace true
360
361
(str " Protocol " (:protocol info) " declares method "
361
362
(:name info) " with variadic signature (&)" ))
362
363
364
+ (defmethod error-message :protocol-impl-with-variadic-method
365
+ [warning-type info]
366
+ (str " Protocol " (:protocol info) " implements method "
367
+ (:name info) " with variadic signature (&)" ))
368
+
363
369
(defmethod error-message :protocol-impl-recur-with-target
364
370
[warning-type info]
365
371
(str " Ignoring target object \" " (pr-str (:form info)) " \" passed in recur to protocol method head" ))
Original file line number Diff line number Diff line change 1498
1498
c (count sig)]
1499
1499
(core/when (contains? seen c)
1500
1500
(ana/warning :protocol-duped-method env {:protocol p :fname fname}))
1501
+ (core/when (some '#{&} sig)
1502
+ (ana/warning :protocol-impl-with-variadic-method env {:protocol p :name fname}))
1501
1503
(core/when (core/and (not= decmeths ::not-found ) (not (some #{c} (map count decmeths))))
1502
1504
(ana/warning :protocol-invalid-method env {:protocol p :fname fname :invalid-arity c}))
1503
1505
(recur (next sigs) (conj seen c))))))))
You can’t perform that action at this time.
0 commit comments