On Tuesday, November 25, 2014 8:54:35 AM UTC-5, Michael Griffiths wrote:
>
> Hi Cecil,
>  
> I think the issue doesn't occur for ceil and floor because there's only 
> one overload, so Clojure can infer which method you intended to call (since 
> it can convert a Ratio into a double). Because round has two overloads, 
> which both take a type that can be converted from Ratio (float and double), 
> Clojure cannot know exactly which you intended to call.
>  
> Thanks,
>  
> Michael
>

Yes, but the error message claimed there were *no* matching methods, rather 
than *more than one* matching method.

And it accepts this just fine:

(#(java.net.URL. %1 %2 %3) "http" "x" "y")

despite there being two three-argument overloads for that constructor, 
String String String and URL String URLStreamHandler.

Seems it's another quirk with primitive conversion. Perhaps it should just 
assume you want double when Ratio is passed to a method with overloads for 
double and float?

-- 
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/d/optout.

Reply via email to