Error using toList() of Collectors
venkats at agiledeveloper.com
Thu Jan 10 09:28:55 PST 2013
That failed with other errors, I will standby for further implementation...
On Jan 10, 2013, at 10:21 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> On 10/01/13 18:12, Venkat Subramaniam wrote:
>> Hello everyone,
>> I'm trying to use the new Collectors class.
>> List<Integer> numbers = Arrays.asList(1, 2, 3);
>> //This works
>> List<Integer> numbers1 = numbers.stream()
>> //This does not
>> List<Integer> numbers2 = numbers.stream()
>> error: incompatible types: inferred type does not conform to upper bound(s)
>> inferred: List<Object>
>> upper bound(s): List<Integer>,Object
>> 1 error
>> Is this the expected behavior or am I missing something quite basic here?
> Nested generic method calls support is not fully ready (yet). If you compile with -XDuseGraphInference it should work (do at your own risk ;-)).
More information about the lambda-dev