mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
new inference: reject methrefs with inconsistent number of parameters
(cherry picked from commit 9c41270192e140ed28067e2740333c6d3fa49bd2)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
class Test {
|
||||
interface I {
|
||||
void m(Integer x1, Integer x2, Integer x3);
|
||||
}
|
||||
|
||||
static class Foo {
|
||||
static void foo() {}
|
||||
}
|
||||
|
||||
<T> void bar(I i) {}
|
||||
|
||||
void test() {
|
||||
bar<error descr="'bar(Test.I)' in 'Test' cannot be applied to '(<method reference>)'">(Foo::foo)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user