mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 13:20:53 +07:00
method refs: ambiguity checks into resolver; testdata
This commit is contained in:
@@ -154,3 +154,32 @@ class MyTest5 {
|
||||
}
|
||||
}
|
||||
|
||||
public class MyTest6 {
|
||||
interface I {
|
||||
void _(Integer i);
|
||||
}
|
||||
|
||||
static void foo(Number i) {}
|
||||
static void foo(Integer i, String s) {}
|
||||
static void foo(Integer d) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
I s = MyTest6::foo;
|
||||
s._(1);
|
||||
}
|
||||
}
|
||||
|
||||
public class MyTest7 {
|
||||
interface I {
|
||||
void _(Number i);
|
||||
}
|
||||
|
||||
static void foo(Number i) {}
|
||||
static void foo(Integer i, String s) {}
|
||||
static void foo(Integer d) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
I s = MyTest7::foo;
|
||||
s._(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user