In clojure, how do I type type hint a type that I have created? (I want to nest the types.)
e.g. I had thought that this would work:
(deftype A
[#^somePrimitive someField])
(deftype B
[#^A Avalue])
This brings up an error message:
Unknown location:
error: java.lang.ClassNotFoundException: A
Note: clojure types are a new feature which currently exists only in the 'new' branch of clojure.
Edit: I was confused by the different ways of type hinting in clojure for java and clojure types. java classes are hinted as
#^java.some.class
while clojure types are hinted as:
#^:some.Namespace/type