Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327844 - collect and reject does not have the correct type calculator
Summary: collect and reject does not have the correct type calculator
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: b3 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 20:26 EDT by Henrik Lindberg CLA
Modified: 2017-09-13 11:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindberg CLA 2010-10-14 20:26:21 EDT
collect and reject does not have the correct type calculator and thus something like:

var a = 0;
(0..3).collect(x| a += x);

flags an error for += since x is believed to be an Object (not an Integer) which can be inferred.

This is because the collect (and reject) function does not have a correct type calculator.