lambda -> methref: respect laziness (IDEA-133372)

This commit is contained in:
Anna Kozlova
2014-11-24 11:52:20 +01:00
parent a22d87f6b2
commit efc2dc0c59
4 changed files with 52 additions and 17 deletions

View File

@@ -1,13 +0,0 @@
// "Replace lambda with method reference" "true"
class Example {
public void m() {
}
{
Runnable r = ex()::m;
}
Example ex() {
return this;
}
}

View File

@@ -1,4 +1,4 @@
// "Replace lambda with method reference" "true"
// "Replace lambda with method reference" "false"
class Example {
public void m() {
}

View File

@@ -0,0 +1,13 @@
// "Replace lambda with method reference" "false"
class Example {
public void m(Example a) {
}
{
A aA = (a) -> a.<caret>m(a);
}
}
interface A {
void a(Example a);
}