Thanks for helping post the question!
For additional context, I noticed that defprotocol
generates a valid interface given the same metadata tags, because the generated methods are dynamically typed, with the tags only being placed as type hints in the protocol map.
user=> (defprotocol PFoo (^String/1 bar [this]))
PFoo
user=> (reify user.PFoo (bar [this] :ok))
#object[user$eval196$reify__197 0x64a9d48c "user$eval196$reify__197@64a9d48c"]
user=> (bar *1)
:ok
user=> (first (.getMethods (:on-interface PFoo)))
#object[java.lang.reflect.Method 0x35178483 "public abstract java.lang.Object user.PFoo.bar()"]
Although the fact that it produces an unreadable symbol feels just as wrong:
user=> (:sigs PFoo)
{:bar {:tag [Ljava.lang.String;, :name bar, :arglists ([this]), :doc nil}}
user=> (get-in PFoo [:sigs :bar :tag])
[Ljava.lang.String;
user=> (class *1) ; oh no
clojure.lang.Symbol