[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] OAW - Type Casting with XTend

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?