John Rose wrote:
On Aug 18, 2009, at 6:07 AM, Raffaello Giulietti wrote:
Hi Christian,
do an upcast
String result = mh.Stringinvoke((Object) foo);
Yes. The difference between the two call sites is:
(Ljava/lang/String;)Ljava/lang/String;
vs.
Hi!
Looks like there is a problem with findVirtual. Since I don't know very
much about the MethodHandle Java level, I want to be sure it's not my fault.
Doing:
MethodHandle mh = MethodHandles.lookup().findVirtual(Object.class,
toString, MethodType.make(String.class));
String result =
Shouldn't that be
mh.String,Objectinvoke(foo)
? It returns a String and takes an Object.
Attila.
On 2009.08.18., at 10:55, Christian Thalinger wrote:
MethodHandle mh = MethodHandles.lookup().findVirtual(Object.class,
toString, MethodType.make(String.class));
String result =
Attila Szegedi wrote:
Shouldn't that be
mh.String,Objectinvoke(foo)
? It returns a String and takes an Object.
No, the syntax is correct. A MethodHandle invoke only specifies the
return type.
-- Christian
___
mlvm-dev mailing list
Christian Thalinger wrote:
Attila Szegedi wrote:
Shouldn't that be
mh.String,Objectinvoke(foo)
? It returns a String and takes an Object.
No, the syntax is correct. A MethodHandle invoke only specifies the
return type.
-- Christian
___
On Aug 18, 2009, at 6:07 AM, Raffaello Giulietti wrote:
Hi Christian,
do an upcast
String result = mh.Stringinvoke((Object) foo);
Yes. The difference between the two call sites is:
(Ljava/lang/String;)Ljava/lang/String;
vs.
(Ljava/lang/Object;)Ljava/lang/String;
The actual (erased)