mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
new inference: include additional constraints to check applicability (IDEA-140355)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
|
||||
void foo() {
|
||||
log(get(TreeSet<String>::new));
|
||||
}
|
||||
|
||||
private void <warning descr="Private method 'log(java.lang.String[])' is never used">log</warning>(String params[]) {
|
||||
System.out.println(params);
|
||||
}
|
||||
private void log(Object params) {
|
||||
System.out.println(params);
|
||||
}
|
||||
|
||||
<C> C get(Supplier<C> s) {
|
||||
return s.get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user