2011/10/22 Ivan Koblik <ivankob...@gmail.com>:
> 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 following snippet:

(definterface A
  (^"[S" smethod [^"[S" arg])
  (^shorts method [^shorts arg]))

Yields the following class definition:

public abstract interface A
{
  public abstract [S smethod([S arg);
  public abstract short[] method(short[] arg);
}

This code comes from a decompiler. Note, that it refers to a class,
literally named [S, while the other hint (derived from ^shorts) gets
demangled as short[].
Eclipse agrees with that notion.

What I realized only now, is that the runtime checker doesn't seem to
care and still takes it as a short array.
It would still be interesting, why the difference in unmangling?

Anyway, that leaves [L; arrays and constructor decorations to be desired.

Is there a way to do them?

> I'm not sure what happens in case of arrays, but for simple return types it
> definitely does the check.

Then it's supposed to check arrays too, since even object arrays are
not subject to type erasure.
Which is the reason we need to be able to declare them when talking to java.

thanks for helping me getting this straight

kind regards
-- 
__________________________________________________________________
Herwig Hochleitner

-- 
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

Reply via email to