| Summary: | [evaluator] OCL Interpreter Console does not compute indexOf() for enum | ||
|---|---|---|---|
| Product: | [Modeling] OCL | Reporter: | Joern E. <joern_e> |
| Component: | Core | Assignee: | OCL Inbox <mdt-ocl-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | ed |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Joern E.
CollectionKind.allInstances()->asSequence()->indexOf(CollectionKind::Set) works in the pivot evaluator.
I looked at changing the modelled:
type Enumeration conformsTo OclAny {
static operation allInstances<OclSelf>() : Set<OclSelf>;
}
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.
OMG Issue 15420 raised. CLOSED after a year in the RESOLVED state. |