Skip to content

Instantly share code, notes, and snippets.

@duck1123
Created October 26, 2011 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duck1123/1315062 to your computer and use it in GitHub Desktop.
Save duck1123/1315062 to your computer and use it in GitHub Desktop.
interface is not a protocol
https://github.com/wilkes/karras/blob/6a8297fe79615fe3188af7388757214088492cbd/src/karras/core.clj#L34
(defprotocol MongoMappable
"(to-dbo [d])
(to-clj [d])
Implementations provided for Map, List, Object, and nil"
(to-dbo [d])
(to-clj [d])
(to-description [d]))
<my code>
(extend DateTime
MongoMappable
(:to-dbo [d] (str d))
(:to-clj [d] (str d))
(:to-description [d] (str d)))
<error>
Unknown location:
error: java.lang.IllegalArgumentException: interface karras.core.MongoMappable is not a protocol
Compilation failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment