File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
typed/clj.analyzer/src/typed/clj/analyzer Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 499
499
" Given a vector of arg tags and a collection of methods, tries to return the
500
500
subset of methods that match best the given tags"
501
501
[tags methods]
502
- (let [o-tags (mapv #(or (maybe-class %) Object) tags)]
503
- (if-let [methods (or (seq (filterv #(= o-tags (mapv maybe-class (:parameter-types %))) methods))
504
- (seq (filterv #(tag-match? tags %) methods)))]
502
+ (let [o-tags (mapv #(or (maybe-class %) Object) tags)
503
+ methods' (filterv #(= o-tags (mapv maybe-class (:parameter-types %)))
504
+ methods)
505
+ methods' (if (seq methods') methods'
506
+ (filterv #(tag-match? tags %) methods))]
507
+ (if (seq methods')
505
508
(reduce (fn [[prev & _ :as p] next]
506
509
(let [prev-params (mapv maybe-class (:parameter-types prev))
507
510
next-params (mapv maybe-class (:parameter-types next))
532
535
(not-any? true ? (map subsumes? prev-params next-params)))
533
536
[next]
534
537
:else
535
- (conj p next)))) [] methods)
538
+ (conj p next)))) [] methods' )
536
539
methods)))
537
540
538
541
(defn ns->relpath [s]
You can’t perform that action at this time.
0 commit comments