change signature: convert method reference to lambda if SAM method signature was changed (IDEA-150138)

This commit is contained in:
Anna Kozlova
2016-01-13 16:54:58 +01:00
parent b56e7e0c20
commit 3fd8dfd38c
5 changed files with 66 additions and 4 deletions
@@ -0,0 +1,11 @@
interface I {
void m<caret>(int a, int b);
}
class Test {
{
I i = this::foo;
}
private void foo(int a, int b) {}
}
@@ -0,0 +1,11 @@
interface I {
void m(int b, int a);
}
class Test {
{
I i = (b, a) -> foo(a, b);
}
private void foo(int a, int b) {}
}