On 16 May 2016, at 15:53, Alex Miller <a...@puredanger.com> wrote: > > This is kind of an interesting case. From poking at it a bit, the {} is typed > as a IPersistentMap, and IPM does NOT extend java.util.Map (although the > implementations like PersistentArrayMap and PersistentHashMap do via > APersistentMap). > > I think the interesting question is why the type hint is not taking effect as > you would expect that to work. That could be because {} is a constant empty > map. That needs some more investigation and if you wanted to file a jira > ticket, we could do so further.
It's because you can't (currently) override type hints on constant collections, see: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L1950-L1960 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2962-L2972 -- 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.
signature.asc
Description: Message signed with OpenPGP using GPGMail