-
-
Save KirinDave/f680abfeb365a3f881e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Projects/blogtoys/ex % 〕clojure ← 0 | |
Clojure 1.2.0-master-SNAPSHOT | |
user=> (ns a) | |
nil | |
a=> (defprotocol testp (x [this])) | |
testp | |
a=> (ns b) | |
nil | |
b=> (defprotocol testp (x [this])) | |
testp | |
b=> (in-ns 'user) | |
#<Namespace user> | |
user=> a/testp | |
{:on-interface a.testp, :on a.testp, :sigs {:x {:doc nil, :arglists ([this]), :name x}}, :var #'a/testp, :method-map {:x :x}, :method-builders {#'a/x #<a$eval16$fn__17 a$eval16$fn__17@7f26d3df>}} | |
user=> b/testp | |
{:on-interface b.testp, :on b.testp, :sigs {:x {:doc nil, :arglists ([this]), :name x}}, :var #'b/testp, :method-map {:x :x}, :method-builders {#'b/x #<b$eval48$fn__49 b$eval48$fn__49@2bbe2893>}} | |
user=> (deftype TestType [internal structure] | |
a/testp | |
(x [this] internal) | |
b/testp | |
(x [this] structure)) | |
java.lang.ClassFormatError: Duplicate method name&signature in class file user/TestType (NO_SOURCE_FILE:9) | |
user=> ; but oddly enough | |
user=> (extend-type java.lang.String | |
a/testp | |
(x [this] 1) | |
b/testp | |
(x [this] 2)) | |
nil | |
; That's fine? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment