On Jul 4, 8:51 am, Adrian Cuthbertson <adrian.cuthbert...@gmail.com> wrote: > I've tried every permutation of type hinting, but cannot get rid of > those warnings. > > Any ideas? > > -Thanks, Adrian.
Notice this: user> (set! *warn-on-reflection* true) true user> (import '(java.io File)) java.io.File user> (definterface IFile (^String getNm[])) (deftype TFile [^File file] IFile (^String getNm[_] (.getName file))) user.TFile user> (.getNm (TFile. (java.io.File. "d/tst.clf"))) "tst.clf" user> I think it is the var that should be hinted. In practice you probably have a function which could have a hinted arg. /Karl -- 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