Clojure

defprotocol doesn't resolve tag classnames

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5, Release 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code and Test

Description

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)

Activity

Nicola Mometto made changes -
Field Original Value New Value
Attachment 001-CLJ-1180.patch [ 11904 ]
Nicola Mometto made changes -
Attachment 001-CLJ-1180.patch [ 11905 ]
Nicola Mometto made changes -
Attachment 001-CLJ-1180.patch [ 11904 ]
Andy Fingerhut made changes -
Patch Code and Test [ 10002 ]
Hide
Alex Miller added a comment -

Similer to CLJ-1232.

Show
Alex Miller added a comment - Similer to CLJ-1232.
Alex Miller made changes -
Labels protocols

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: