Skip to content

Commit dabff91

Browse files
fix utils
1 parent f85b0b1 commit dabff91

File tree

1 file changed

+7
-4
lines changed
  • typed/clj.analyzer/src/typed/clj/analyzer

1 file changed

+7
-4
lines changed

typed/clj.analyzer/src/typed/clj/analyzer/utils.cljc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,12 @@
499499
"Given a vector of arg tags and a collection of methods, tries to return the
500500
subset of methods that match best the given tags"
501501
[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')
505508
(reduce (fn [[prev & _ :as p] next]
506509
(let [prev-params (mapv maybe-class (:parameter-types prev))
507510
next-params (mapv maybe-class (:parameter-types next))
@@ -532,7 +535,7 @@
532535
(not-any? true? (map subsumes? prev-params next-params)))
533536
[next]
534537
:else
535-
(conj p next)))) [] methods)
538+
(conj p next)))) [] methods')
536539
methods)))
537540

538541
(defn ns->relpath [s]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy