mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
lambda expression isCongruent: ensure target function type has no type parameters
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
interface I {
|
||||
void g();
|
||||
|
||||
}
|
||||
interface J {
|
||||
<<warning descr="Type parameter 'T' is never used">T</warning>> void f();
|
||||
}
|
||||
class Test {
|
||||
void m(I i) {System.out.println(i);}
|
||||
void m(J j) {System.out.println(j);}
|
||||
|
||||
void m2(J j){System.out.println(j);}
|
||||
|
||||
{
|
||||
m (() -> {});
|
||||
m2(<error descr="Target method is generic">() -> {}</error>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user