test/tools/javac/meth/XlintWarn.java

changeset 820
2d5aff89aaa3
parent 810
15484cb7e5ae
child 957
46d720734db3
child 962
0ff2bbd38f10
     1.1 --- a/test/tools/javac/meth/XlintWarn.java	Thu Jan 13 21:28:38 2011 -0800
     1.2 +++ b/test/tools/javac/meth/XlintWarn.java	Fri Jan 14 09:45:04 2011 +0000
     1.3 @@ -35,6 +35,19 @@
     1.4  class XlintWarn {
     1.5      void test(MethodHandle mh) throws Throwable {
     1.6          int i1 = (int)mh.invokeExact();
     1.7 -        int i2 = (int)mh.invokeVarargs();
     1.8 +        int i2 = (int)mh.invokeGeneric();
     1.9 +        int i3 = (int)mh.invokeWithArguments();
    1.10 +    }
    1.11 +
    1.12 +    void test2(MethodHandle mh) throws Throwable {
    1.13 +        int i1 = (int)(mh.invokeExact());
    1.14 +        int i2 = (int)(mh.invokeGeneric());
    1.15 +        int i3 = (int)(mh.invokeWithArguments());
    1.16 +    }
    1.17 +
    1.18 +    void test3(MethodHandle mh) throws Throwable {
    1.19 +        int i1 = (int)((mh.invokeExact()));
    1.20 +        int i2 = (int)((mh.invokeGeneric()));
    1.21 +        int i3 = (int)((mh.invokeWithArguments()));
    1.22      }
    1.23  }

mercurial