Issue 16168: OCL 2.3 Enumeration::allInstances() does not return instances (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: a) an OrderedSet would be more appropriate b) enumeration literals are instances of EnumerationLiteral; they are not instances of an Enumeration cf. MyClass.allInstances() dynamically overloads Classifier.allInstances() to return all known instantiations of MyClass, rather than all features of MyClass. so why does MyEnumeration.allInstances() prevent me discovering all instantiations of MyEnumeration; Enumeration is a Classifier. The required functionality of MyEnumeration::allInstances() is available as MyEnumeration.ownedLiteral provided reflection is consistently defined. Suggest: remove the Enumeration.allInstances() overload. Resolution: Revised Text: Actions taken: May 6, 2011: received issue Discussion: End of Annotations:===== ronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskIAOulw01UXeb0/2dsb2JhbACYW41nd6YZnziGCQSTeIox Date: Fri, 06 May 2011 08:43:44 +0100 From: Ed Willink User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 To: issues@omg.org Subject: OCL 2.3 Enumeration::allInstances() does not return instances Hi Enumeration::allInstances() is defined to return a set of the corresponding enumeration literals. This is very irregular since a) an OrderedSet would be more appropriate b) enumeration literals are instances of EnumerationLiteral; they are not instances of an Enumeration cf. MyClass.allInstances() dynamically overloads Classifier.allInstances() to return all known instantiations of MyClass, rather than all features of MyClass. so why does MyEnumeration.allInstances() prevent me discovering all instantiations of MyEnumeration; Enumeration is a Classifier. The required functionality of MyEnumeration::allInstances() is available as MyEnumeration.ownedLiteral provided reflection is consistently defined. Suggest: remove the Enumeration.allInstances() overload. Regards Ed Willink