Skip to content

Instantly share code, notes, and snippets.

@hadronzoo
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadronzoo/7e8d2984707cff23bf60 to your computer and use it in GitHub Desktop.
Save hadronzoo/7e8d2984707cff23bf60 to your computer and use it in GitHub Desktop.
No matching arities
(ns tctest.core
(:require [clojure.core.typed :as t]))
(t/defprotocol AProtocol
(some-method [this] :- t/AnyInteger
[this arg :- t/Any] :- t/AnyInteger))
(t/ann-datatype AType [])
(deftype AType []
AProtocol
(some-method [_] 0)
(some-method [_ _] 0))
Start collecting tctest.core
Finished collecting tctest.core
Collected 1 namespaces in 117.312 msecs
Not checking clojure.core.typed (does not depend on clojure.core.typed)
Start checking tctest.core
9: Not checking tctest.core/->AType definition
Checked tctest.core in 195.676 msecs
Checked 2 namespaces in 319.383 msecs
Type Error (tctest/core.clj:9:1) No matching arities: [AType t/Any -> t/AnyInteger]
in: (some-method [_] 0)
Type Error (tctest/core.clj:9:1) No matching arities: [AType -> t/AnyInteger]
in: (some-method [_ _] 0)
ExceptionInfo Type Checker: Found 2 errors clojure.core/ex-info (core.clj:4577)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment