introduce parameter: expand method reference to lambda when new parameter introduced (IDEA-152125)

This commit is contained in:
Anna Kozlova
2016-02-25 16:17:33 +01:00
parent 716c8794ae
commit 61816006f6
5 changed files with 45 additions and 3 deletions
@@ -0,0 +1,13 @@
interface I {
boolean m(int a);
}
class A {
{
I predicate = (a) -> A.alwaysTrue(a, "");
}
private static boolean alwaysTrue(int a, String anObject) {
return true;
}
}
@@ -0,0 +1,14 @@
interface I {
boolean m(int a);
}
class A {
{
I predicate = A::alwaysTrue;
}
private static boolean alwaysTrue(int a) {
<selection>""</selection>
return true;
}
}