Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363426

Summary: [language] Model the collect() iteration
Product: [Modeling] OCL Reporter: Ed Willink <ed>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

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().