68 b.m(1); |
68 b.m(1); |
69 |
69 |
70 b = MethodRef1::foo; //static reference to foo(int) |
70 b = MethodRef1::foo; //static reference to foo(int) |
71 b.m(1); |
71 b.m(1); |
72 |
72 |
73 b = new MethodRef1()::foo; //instance reference to static methods, supported for now |
|
74 b.m(1); |
|
75 |
|
76 b = MethodRef1::bar; //static reference to bar(int) |
73 b = MethodRef1::bar; //static reference to bar(int) |
77 b.m(2); |
74 b.m(2); |
78 |
75 |
79 C c = MethodRef1::bar; //static reference to bar(String) |
76 C c = MethodRef1::bar; //static reference to bar(String) |
80 assertTrue( c.m("hi").equals("MethodRef1.bar(String) hi") ); |
77 assertTrue( c.m("hi").equals("MethodRef1.bar(String) hi") ); |