new inference: ensure type parameters are not modified during ground type evaluation

This commit is contained in:
Anna Kozlova
2014-02-21 11:52:26 +01:00
parent 6a38fbafaf
commit 948ad3e6d4
3 changed files with 28 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
import java.util.*;
import java.util.stream.*;
class Test {
{
Collector<Employee, ?, Map<Department, List<Employee>>> objectMapCollector = Collectors.groupingBy(Employee::getDepartment);
}
private class Employee {
public Department getDepartment() {
return new Department();
}
}
private class Department {}
}