user=> (definterface MyInterface
  #_=>      (^java.lang.String method1 []))
user.MyInterface
user=> (.method1 (reify MyInterface (^java.lang.String method1 [this] )))

On Wednesday, October 9, 2013 8:55:06 PM UTC+8, Qiu Xiafei wrote:
>
> Clojure provide built-in type hint for primitive types such as: ^ints, 
> ^doubles, but how to type hint an array of arbitrary Class?
> The following way dosn't work, too:
>
> user=> (definterface MyInterface
>   #_=>      (^"[Ljava.lang.String" method1 []))
> user.MyInterface
> user=> (.method1 (reify MyInterface (^"[Ljava.lang.String;" method1 [this] 
> )))
>
> CompilerException java.lang.NoClassDefFoundError: [Ljava/lang/String, 
> compiling:(NO_SOURCE_PATH:1:11) 
>
>
>
> thanks! 
>

-- 
-- 
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/groups/opt_out.

Reply via email to