Hi,

I wonder if anyone could point to the explanation why MH.bindTo() is
accepting only reference types? This behavior seems surprising for
newcomers like me, mostly because similar API accepts primitive types.
For one, given:

 public static void foo(int i);

...and the MethodHandle mh referring to it, I can do:
 MethodHandle mh2 = MethodHandles.insertArguments(mh, 0, (int)someInt)

...but this one is prohibited:
 MethodHandle mh2 = mh.bindTo((int)someInt);

Thanks,
-Aleksey.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to