lambda -> method ref: do not convert if resulted ref would be ambiguous (IDEA-116964)

This commit is contained in:
anna
2013-11-28 21:40:19 +01:00
parent 9859872004
commit 3c78ab4dc5
4 changed files with 65 additions and 8 deletions

View File

@@ -0,0 +1,10 @@
// "Replace lambda with method reference" "true"
class Example {
interface I {
String foo(Integer i);
}
{
I i = Object::toString;
}
}

View File

@@ -0,0 +1,10 @@
// "Replace lambda with method reference" "true"
class Example {
interface I {
String foo(Integer i);
}
{
I i = (i1) -> i1.<caret>toString();
}
}