| OAW - Type Casting with XTend [message #617739] |
Mon, 16 June 2008 08:25 |
|
Originally posted by: any.swc.rwth-aachen.de
I have specified the following in my Extension:
cached int getConnectorCount(uml::ConnectorEnd e) :
uml::MultiplicityElement.isInstance(e.role) ?
e.getPartWithPortMultiplicity() * e.upper() *
((uml::MultiplicityElement)e.role).upper()
: e.getPartWithPortMultiplicity() * e.upper()
;
The cast of e.role into MultiplicityElemenet is acknowledged by the OAW
environement with the error "cannot cast from uml::ConnectableElement into
uml::MultiplicityElement". The dynamic type of e.role may however by a
MultiplicityElement. What am I doing wrong?
|
|
|
Powered by
FUDForum. Page generated in 0.03643 seconds