Hello,
I am getting a reflection warning in Java interop and don’t understand
why:
(import 'java.time.format.DateTimeFormatterBuilder
'java.time.temporal.ChronoField)
(set! *warn-on-reflection* true)
(let [builder (DateTimeFormatterBuilder.)]
(.appendText builder ChronoField/YEAR {}))
; Reflection warning, ... - call to method appendText on
java.time.format.DateTimeFormatterBuilder can't be resolved (argument
types: java.time.temporal.ChronoField, clojure.lang.IPersistentMap).
The method expects a java.util.Map, which {} implements, so this should
resolve without problem. I have tried adding a type hint but it has no
effect:
(let [builder (DateTimeFormatterBuilder.)]
(.appendText builder ChronoField/YEAR ^java.util.Map {}))
What is the best way to type-hint this properly?
Thank you,
--
David
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.