Interestingly, this does not occur if the type hint is on the var rather than the arglist. According to the IRC conversation referenced here<https://github.com/jonase/eastwood/issues/37>, this should work fine for non-primitive type hints.
On 8 May 2014 16:55, Colin Fleming <colin.mailingl...@gmail.com> wrote: > Hi all, > > I just came across a case with AOT compilation that I haven't seen before. > I have the following code: > > (defn clojurescript? [element] > (or (.isKindOf (psi/language element) > (ClojurescriptLanguage/getInstance)) > (.isKindOf (psi/language element) (CljxLanguage/getInstance)))) > > psi/language looks like this: > > (defn language ^Language [^PsiElement element] > (.getLanguage element)) > > This gives me the following error when compiling: > > Caused by: java.lang.IllegalArgumentException: Unable to resolve > classname: Language > at clojure.lang.Compiler$HostExpr.tagToClass(Compiler.java:1060) > at clojure.lang.Compiler$InvokeExpr.getJavaClass(Compiler.java:3567) > at clojure.lang.Compiler$InstanceMethodExpr.<init>(Compiler.java:1393) > at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:952) > at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560) > > I can get rid of this error importing Language into the original > namespace. But I didn't expect this - does this mean that an import is > required for the tag type of any function used in a particular namespace? > Does this also apply to argument tags? > > Thanks, > Colin > -- 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.