Welcome! Please see the About page for a little more info on how this works.

0 votes
in Protocols by
closed by

defprotocol doesn't resolve tag classnames, this results in exceptions being thrown when the declared protocol uses as a tag an imported class that is not imported in the namespace that uses it.

user=> (import 'clojure.lang.ISeq) clojure.lang.ISeq user=> (defprotocol p (^ISeq f [_])) p user=> (ns x) nil x=> (defn x [y] (let [z (user/f y)] (inc z))) CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: ISeq, compiling:(NO_SOURCE_PATH:4:33)

Patch: clj-1180-2.patch

Screened by: Alex Miller
- My only hesitancy with this patch is making the tagToClass public and reaching into it from core_deftype - this means that call into the Compiler needs to remain open forever as an api.

closed with the note: Released in 1.11.0-beta1

3 Answers

0 votes
by

Comment made by: alexmiller

Similer to CLJ-1232.

0 votes
by

Comment made by: alexmiller

Patch updates for current master, retains attribution.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-1180 (reported by bronsa)
...