store/[org.clojure/core.typed "0.2.81"] clj::clojure.core.typed.test.nth-path-elem-test/nth-path-elem-test-multimethod

Source

(deftest nth-path-elem-test-multimethod
  (is-tc-e
   (do
     (defalias StatementA '[':params String])
     (defalias StatementB '[':no-params])
     (defalias Statement (U StatementA StatementB))

     (ann nth-path-multimethod [Statement -> Any])
     (defmulti nth-path-multimethod first)

     (defmethod nth-path-multimethod :params [stmt]
       (ann-form stmt StatementA))

     (defmethod nth-path-multimethod :no-params [stmt]
       (ann-form stmt StatementB)))))

Uses on crossclj