I was playing around with protocols at the REPL and encountered the following:
(deftype MyGreeter 
(greet [_] "hi from MyGreeter"))
(extends? IGreeter MyGreeter)
;; I expected to see MyGreeter listed here, but result is nil
Now extend the protocol to a few types.
(greet [this] "hi-string")
(greet [this] 'hi-sym) ; ' help syntax highlighter
(greet [this] :hi-kw))
;=> (java.lang.String clojure.lang.Symbol clojure.lang.Keyword)
String, Symbol and Keyword show up as extenders of IGreeter. MyGreeter does not. This was especially surprising since (extends? IGreeter MyGreeter) returns true. Am I misunderstanding something or could this be a bug? Thank you!