method refs: do not loose information about type arguments given by ReferenceType in receiver

This commit is contained in:
Anna Kozlova
2014-04-11 13:15:22 +02:00
parent a3348c56cb
commit d84cfe4661
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class Box<T>
{
public T getValue()
{
return null;
}
void f(Stream<Box<String>> stream) {
List<String> l3 = stream
.map(Box<String>::getValue)
.collect(Collectors.toList());
}
}