new inference: temp solution to exclude inference results from nested call of the same method on the outer level

This commit is contained in:
Anna Kozlova
2014-02-27 17:07:37 +01:00
parent 5dd7e0622c
commit b31b23cd0b
4 changed files with 46 additions and 5 deletions

View File

@@ -1,5 +1,30 @@
import java.util.List;
import java.util.function.Function;
abstract class Main2 {
void address(Foo sa) {
String ds = foobar(foobar(sa, Foo::getBar), Bar ::getName);
Function<Foo, Bar> f = null;
String ds1 = foobar(foobar(sa, f), null);
}
abstract <T, V> V foobar(T t, Function<T, V> mapper);
class Foo {
Bar getBar() {
return new Bar();
}
}
class Bar {
String getName(){
return null;
}
}
}
class Main0 {
<T> List<T> foo(T t){
return null;