Re: defn allows overwriting Protocol function without notification

2010-05-22 Thread Aaron Cohen
Sorry for the duplicate messages. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe fr

defn allows overwriting Protocol function without notification

2010-05-22 Thread Aaron Cohen
user=> (defn foo [_] "foo") user=> (defprotocol IFoo             (foo [_])) Warning: protocol #'user/IFoo is overwriting function foo IFoo user=> (extend-protocol IFoo nil (foo [_] "IFoo")) nil user=> (foo nil) "IFoo" user=> (foo 1) java.lang.IllegalArgumentException: No implementation of metho

defn allows overwriting Protocol function without notification

2010-05-22 Thread Aaron Cohen
user=> (defn foo [_] "foo") user=> (defprotocol IFoo (foo [_])) Warning: protocol #'user/IFoo is overwriting function foo IFoo user=> (extend-protocol IFoo nil (foo [_] "IFoo")) nil user=> (foo nil) "IFoo" user=> (foo 1) java.lang.IllegalArgumentException: No implementation of meth