Array type hints in 1.3

2011-10-20 Thread Herwig Hochleitner
Hi, definterface has the ability to type methods. http://dev.clojure.org/jira/browse/CLJ-737 and its attached patch http://dev.clojure.org/jira/secure/attachment/10119/definterface-array-fix-with-tests.patch suggest, that you should be able specify array types too. When I tried it (in 1.3), howev

Re: Array type hints in 1.3

2011-10-21 Thread Herwig Hochleitner
Another annotation bug: Annotations on gen-class in an ns form, like (ns foo (:gen-class ^{Singleton {}} foo.ClassName)) don't seem to work. -- __ Herwig Hochleitner -- You received this message because you are subscribed to the G

Re: Array type hints in 1.3

2011-10-21 Thread Ivan Koblik
Hello Herwig, I checked the patch you linked to in your original post, and it doesn't seem that type hinting for native arrays of Objects is supported, that is the [L type. Native arrays of native types work quite well. (definterface Name (^"[S" method [])) ;;returns array of shorts (def p (proxy

Re: Array type hints in 1.3

2011-10-21 Thread Herwig Hochleitner
Just found another one: You can't annotate constructors of gen-class. 2011/10/22 Ivan Koblik : > Hello Herwig, > I checked the patch you linked to in your original post, and it doesn't seem > that type hinting for native arrays of Objects is supported, that is the [L > type. Yes. It should be.

Re: Array type hints in 1.3

2011-10-21 Thread Ivan Koblik
I reread your original post, sorry I saw that you managed to declare type constrained methods. Then, what was your question about? Type hinting for arguments works as well: (definterface Name (^"[S" method [^"[S" short-arg])) (def p (proxy [Name] [] (method [^"[S" short-arg] short-arg)))

Re: Array type hints in 1.3

2011-10-22 Thread Herwig Hochleitner
2011/10/22 Ivan Koblik : > I reread your original post, sorry I saw that you managed to declare type > constrained methods. Then, what was your question about? I just reread it too and realized I didn't make a whole lot of sense. I'll try again: > Do you mean the interface name? Compiling the fol