mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
method refs: testdata
This commit is contained in:
@@ -14,3 +14,31 @@ class MyTest {
|
||||
I i = Foo::m;
|
||||
}
|
||||
}
|
||||
|
||||
class MyTest1 {
|
||||
|
||||
interface I1 {
|
||||
void m(String s);
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
void m(Integer i);
|
||||
}
|
||||
|
||||
interface I3 {
|
||||
void m(Object o);
|
||||
}
|
||||
|
||||
static class Foo<T extends Number> {
|
||||
Foo(T t) {}
|
||||
}
|
||||
|
||||
|
||||
static void foo(I1 i) {}
|
||||
static void foo(I2 i) {}
|
||||
static void foo(I3 i) {}
|
||||
|
||||
static {
|
||||
foo(Foo::new);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,3 +72,20 @@ class MyTest {
|
||||
}
|
||||
}
|
||||
|
||||
class MyTest2 {
|
||||
|
||||
interface IBool { void m(boolean[] a); }
|
||||
interface IInt { void m(int[] a); }
|
||||
interface IDbl { void m(double[] a); }
|
||||
interface IObj { void m(Object[] a); }
|
||||
|
||||
static void foo(Object... vi) {}
|
||||
|
||||
static {
|
||||
IBool iBool = MyTest2::foo;
|
||||
IInt iInt = MyTest2::foo;
|
||||
IDbl iDbl = MyTest2::foo;
|
||||
IObj iObj = MyTest2::foo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user