don't try to infer from top if overloaded flag is on (IDEA-156937)

This commit is contained in:
Anna Kozlova
2016-06-02 17:01:51 +03:00
parent 1123c2486e
commit 9c95fa5524
4 changed files with 68 additions and 9 deletions
@@ -0,0 +1,30 @@
import java.util.Collection;
import java.util.function.Function;
import java.util.function.Supplier;
class Foo<T> {
{
bar(() -> Result.create(new Function<String, String>() {
@Override
public String apply(String s) {
throw new UnsupportedOperationException();
}
}, new Object())
);
}
private static <T> void bar(Supplier<T> provider ){}
static class Result<K> {
public static <T> Result<T> create( T value, Collection<?> dependencies) {
return new Result<T>();
}
public static <T> Result<T> create( T value, Object... dependencies) {
return new Result<T>();
}
}
}