eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Empty Collections are not typecasted correctly #118

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 164605 | | Status | CLOSED DUPLICATE of bug 164614 | | Importance | P3 critical | | Reported | Nov 15, 2006 04:31 EDT | | Modified | May 27, 2011 02:47 EDT | | Version | 1.0.1 | | Reporter | Steffen Becker |

Description

The following OCL expression should evaluate correctly:\ let v:Bag(String)=Bag{} in true

However, debugging the EMFT OCL code it shows that the Bag with no elements is actually a Bag(EClassifier) which is not conform to Bag(String) - but the Bag is also empty which allows one to cast it to any other bag as many examples in the OCL spec show. Note the above OCL expression is simplified for debugging. In reality I want to use it in an iterate expression to start with an empty accumulator collection...

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Nov 15, 2006 09:34

Please use the MDT Product, UML2 OCL Component for reporting new bugs.

This bug has been marked as a duplicate of 164614

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:47

Closing after over 18 months in resolved state.