| Summary: | Cast shows error if one instance is of Type ecore::EObject | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] M2T | Reporter: | Benjamin Schwertfeger <benjamin.schwertfeger> | ||||
| Component: | Xpand | Assignee: | Karsten Thoms <karsten.thoms> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | karsten.thoms | ||||
| Version: | 1.1.0 | Flags: | karsten.thoms:
juno+
|
||||
| Target Milestone: | M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
EClassType needed to treat the special case, when the EClassType represents ecore::EObject itself. In this case any EClassType must be assignable. Overridden EClassType#internalIsAssignableFrom() Added unit test EmfMetaModelTest#testIsAssignableFrom() Bug resolved before Xpand 1.2 release date => Closing |
Created attachment 210512 [details] Example with error If you have two Metamodels M1 and M2 with a reference in m1 to EObject, the Type in the EMF-Metamodel becomes ecore::EObject which is a emf::EObject, but not the same. M1: Referencing: source: EObject M2: CastErrror with «IMPORT m1» «IMPORT m2» «DEFINE test FOR m1::Referencing» «((CastError)this.source).toString()» «ENDDEFINE» shows the error at the cast. ecore::EObject should look like emf::EObject in this situation.