提交 a81615a6 编写于 作者: L lana

Merge

...@@ -77,23 +77,23 @@ public class InvokeMH { ...@@ -77,23 +77,23 @@ public class InvokeMH {
Object o; String s; int i; // for return type testing Object o; String s; int i; // for return type testing
// next five must have sig = (*,*)* // next five must have sig = (*,*)*
o = mh_SiO.invokeGeneric((Object)"world", (Object)123); o = mh_SiO.invoke((Object)"world", (Object)123);
mh_SiO.invokeGeneric((Object)"mundus", (Object)456); mh_SiO.invoke((Object)"mundus", (Object)456);
Object k = "kosmos"; Object k = "kosmos";
o = mh_SiO.invokeGeneric(k, 789); o = mh_SiO.invoke(k, 789);
o = mh_SiO.invokeGeneric(null, 000); o = mh_SiO.invoke(null, 000);
o = mh_SiO.invokeGeneric("arda", -123); o = mh_SiO.invoke("arda", -123);
// sig = ()String // sig = ()String
o = mh_vS.invokeGeneric(); o = mh_vS.invoke();
// sig = ()int // sig = ()int
i = (int) mh_vi.invokeGeneric(); i = (int) mh_vi.invoke();
o = (int) mh_vi.invokeGeneric(); o = (int) mh_vi.invoke();
mh_vi.invokeGeneric(); mh_vi.invoke();
// sig = ()void // sig = ()void
mh_vv.invokeGeneric(); mh_vv.invoke();
o = mh_vv.invokeGeneric(); o = mh_vv.invoke();
} }
} }
...@@ -35,19 +35,19 @@ import java.lang.invoke.*; ...@@ -35,19 +35,19 @@ import java.lang.invoke.*;
class XlintWarn { class XlintWarn {
void test(MethodHandle mh) throws Throwable { void test(MethodHandle mh) throws Throwable {
int i1 = (int)mh.invokeExact(); int i1 = (int)mh.invokeExact();
int i2 = (int)mh.invokeGeneric(); int i2 = (int)mh.invoke();
int i3 = (int)mh.invokeWithArguments(); int i3 = (int)mh.invokeWithArguments();
} }
void test2(MethodHandle mh) throws Throwable { void test2(MethodHandle mh) throws Throwable {
int i1 = (int)(mh.invokeExact()); int i1 = (int)(mh.invokeExact());
int i2 = (int)(mh.invokeGeneric()); int i2 = (int)(mh.invoke());
int i3 = (int)(mh.invokeWithArguments()); int i3 = (int)(mh.invokeWithArguments());
} }
void test3(MethodHandle mh) throws Throwable { void test3(MethodHandle mh) throws Throwable {
int i1 = (int)((mh.invokeExact())); int i1 = (int)((mh.invokeExact()));
int i2 = (int)((mh.invokeGeneric())); int i2 = (int)((mh.invoke()));
int i3 = (int)((mh.invokeWithArguments())); int i3 = (int)((mh.invokeWithArguments()));
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册