lambda -> method reference: ambiguity prevented (IDEA-130126)

This commit is contained in:
Anna Kozlova
2014-09-30 17:05:12 +02:00
parent 5c2dcfef51
commit 9f72b14b9c
2 changed files with 27 additions and 6 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 -> Foo.b<caret>ar());
}
}