Closed eclipse-ocl-bot closed 2 hours ago
By Ed Willink on May 04, 2011 14:59
CollectionKind.allInstances()->asSequence()->indexOf(CollectionKind::Set) works in the pivot evaluator.
I looked at changing the modelled:
type Enumeration conformsTo OclAny {\
static operation allInstances
to OrderedSet, but now I realise that this is a total specification fudge corresponding to the implementation fudge that was required to make it 'work'.
An enumeration literal is an EnumerationLiteral not an Enumeration (cf a property is a Property not a Class).
CollectionKind.ownedLiteral->indexOf(CollectionKind::Set)
also works and is semantically sensible.
I think that Enumeration::allInstances() should be retracted.
WONTFIX: Bugzilla only remains open to raise an OMG Issue.
By Ed Willink on Nov 08, 2011 12:02
OMG Issue 15420 raised.
By Ed Willink on May 20, 2013 11:38
CLOSED after a year in the RESOLVED state.
| --- | --- | | Bugzilla Link | 323069 | | Status | CLOSED WONTFIX | | Importance | P3 minor | | Reported | Aug 18, 2010 13:24 EDT | | Modified | May 20, 2013 11:38 EDT | | Reporter | Joern E. |
Description
Build Identifier: 20100617-1415
Trying to get the ordinal for an enum using EnumType.allInstances()->asSequence()->indexOf(...) does not compute in the OCL Interpreter Console (empty result). It does for other types.\ See http://www.eclipse.org/forums/index.php?t=msg&th=173931&start=0&S=79151d79cb376a55a724e7980d46d1c7 for details.
Reproducible: Always
Steps to Reproduce: