mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
functional interface suggester: check return types and try to infer
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class Test {
|
||||
void bar() {
|
||||
foo(new Supplier<String>() {
|
||||
public String get() {
|
||||
String s = "";
|
||||
System.out.println(s);
|
||||
return s;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void foo(Supplier<String> anObject) {
|
||||
|
||||
String s = anObject.get();
|
||||
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user