mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
lambda -> methref: respect laziness (IDEA-133372)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = ex()::m;
|
||||
}
|
||||
|
||||
Example ex() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "false"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user