more weirdness!

try this at your REPL:

-extend any protocol to some primitive array type - let's say 'doubles'
-while in the same namespace, try to use amap passing it an array of floats and also type-hint it with ^floats
*
**IllegalArgumentException No matching method found: aset clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)*

the same would have happened if the protocol had been extended to floats and tried to use amap with doubles. In fact any combination of primitive types will fail. Only the type that has been extended will work. In the above case that would be doubles. If we extended the protocol to longs then only longs would work and so forth...

I'm almost certain that this is not intentional...any opinions?

Jim

--
--
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to