Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363426 - [language] Model the collect() iteration
Summary: [language] Model the collect() iteration
Status: NEW
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 02:19 EST by Ed Willink CLA
Modified: 2011-11-10 02:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-11-10 02:19:44 EST
The collect iteration flattens and so is the only iterator for which the return kind is dependent on both source and body kinds. This is currently unmodelled and consequently EssentialOCLLeft2RightVisitor special cases iterations named "collect".

One possible solution may involve pairs of declarations for Ordered/Unordered body types.

But flatten() is also unmodelled so probably want a joint solution. Perhaps collect() is syntactic sugar for collectNested()->flatten().