lambda -> method ref: allow conversion with any qualifier, show warning only for trivial qualifiers; same for anonymous -> method ref (IDEA-CR-16052)

This commit is contained in:
Anna.Kozlova
2016-11-22 15:32:34 +01:00
parent 1a1d93d60a
commit 2514f10f0e
4 changed files with 45 additions and 33 deletions

View File

@@ -0,0 +1,13 @@
// "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" "false"
// "Replace lambda with method reference" "true"
class Example {
public void m() {
}