On Wednesday, November 11, 2015 at 9:23:16 AM UTC-5, Nicola Mometto wrote:
>
> To be honest I'm not sure this should even be a valid use of type hints.
> You're telling the compiler that the result of (foo) is an int, when it is 
> infact a long.
>
> The correct way to do this should be:
>  (Integer/bitCount (int (foo))
>
> Again, lack of specification on what the correct type hinting semantics 
> should be make it hard to evaluate if this should be considered a bug or 
> just an user error that previously just got ignored.
>

It's a bug. Even if ^int (thing-that-returns-long) is a user error, the 
result should be a sane error message from the Clojure compiler, not bad 
bytecode that later fails with a VerifyError. 

-- 
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