Issue 12448: section 7.4.6 (p. 12) (ocl2-rtf) Source: (, ) Nature: Enhancement Severity: Significant Summary: In section 7.4.6 (p. 12) it is said "An object can only be re-typed to one of its subtypes; ... If the actual type of the object is not a subtype of the type to which it is re-typed, the expression is undefined" While in section 7.5.8 (p. 19) it is said Whenever we have a class B as a subtype of class A, and a property p1 of both A and B, we can write: context B inv: self.oclAsType(A).p1 -- accesses the p1 property defined in A self.p1 -- accesses the p1 property defined in B and thus an example is shown where an object is retyped to its supertype. Both sections 7.4.6 and 7.5.8 should be joined into one. See slide 32 in my handouts to see a possible abstract of the joined section. Resolution: The problem is fixed by resolution of issue 7341. Casting and accessing properties from a supertype are two different things. Disposition: See Issue 7341 for disposition Revised Text: Actions taken: May 14, 2008: received issue October 16, 2009: closed issue Discussion: The problem is fixed by resolution of issue 7341. Casting and accessing properties from a supertype are two different things. Disposition: See Issue 7341 for disposition End of Annotations:===== me: Esteban Zimanyi Company: Universite Libre de Bruxelles mailFrom: ezimanyi@ulb.ac.be Notification: Yes Specification: OCL Section: many ... FormalNumber: 2006-05-01 Version: 2.0 RevisionDate: 05/10/08 Page: 1..230 Nature: Revision Severity: Significant HTTP User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727) This is issue 12448 In section 7.4.6 (p. 12) it is said "An object can only be re-typed to one of its subtypes; ... If the actual type of the object is not a subtype of the type to which it is re-typed, the expression is undefined" While in section 7.5.8 (p. 19) it is said Whenever we have a class B as a subtype of class A, and a property p1 of both A and B, we can write: context B inv: self.oclAsType(A).p1 -- accesses the p1 property defined in A self.p1 -- accesses the p1 property defined in B and thus an example is shown where an object is retyped to its supertype. Both sections 7.4.6 and 7.5.8 should be joined into one. See slide 32 in my handouts to see a possible abstract of the joined section.