lambda -> method reference: exclude receiver/non-receiver ambiguity (IDEA-129924)

This commit is contained in:
Anna Kozlova
2014-09-17 14:36:14 +04:00
parent 484efff8b4
commit 3e13cddf2b
2 changed files with 24 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
// "Replace lambda with method reference" "false"
import java.io.IOException;
import java.util.List;
import java.util.stream.Stream;
class Foo {
public String bar() {
return "foo";
}
public static String bar(Foo foo) {
return "bar";
}
}
class Test {
public void test() {
Stream.of(new Foo()).map(e -> e.b<caret>ar());
}
}