Skip to content

Commit

Permalink
Update -seqable-or-rest arg list
Browse files Browse the repository at this point in the history
no need to match accept argument signature use only children and opts.
  • Loading branch information
tvaisanen committed Sep 23, 2023
1 parent 68d1a82 commit c35d44e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/malli/clj_kondo.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@
(defmethod accept :qualified-symbol [_ _ _ _] :symbol)
(defmethod accept :uuid [_ _ _ _] :any) ;;??

(defn -seqable-or-rest [_ _ [child] {:keys [arity]}]
(defn -seqable-or-rest [[child] {:keys [arity]}]
(if (= arity :varargs)
{:op :rest :spec child}
:seqable))

(defmethod accept :+ [_ _ children options] (-seqable-or-rest nil nil children options))
(defmethod accept :* [_ _ children options] (-seqable-or-rest nil nil children options))
(defmethod accept :? [_ _ children options] (-seqable-or-rest nil nil children options))
(defmethod accept :repeat [_ _ children options] (-seqable-or-rest nil nil children options))
(defmethod accept :+ [_ _ children options] (-seqable-or-rest children options))
(defmethod accept :* [_ _ children options] (-seqable-or-rest children options))
(defmethod accept :? [_ _ children options] (-seqable-or-rest children options))
(defmethod accept :repeat [_ _ children options] (-seqable-or-rest children options))

(defmethod accept :cat [_ _ children _] children)
(defmethod accept :catn [_ _ children _] (mapv last children))
Expand Down

0 comments on commit c35d44e

Please sign in to comment.