Thanks Radek, the casting thing works. But the return thing doesn't. In
the following mapping
mapping CMM::ConceptualModel::addCommunicationModel(inout rootModel :
CMM::CompositionModel)
{
if(self.container() = rootModel)
then{
if(rootModel.oclIsTypeOf(CompositeComponent))
then{
if(rootModel.oclAsType(CompositeComponent).referencedCompositionModel
= null)
then{
// here I want to just return or at least leave the outer if
return;
}endif;
}endif;
// some computations
} else {
log('container != rootModel (' + self.container().metaClassName() +
',' + rootModel.metaClassName() + ')', self) when true;
}endif;
}
I just want to return or at least leave the outer if after the casting.
How do I achieve this? The editor gives me the following error:
Using ''return'' from mapping operation is not yet supported
best regards,
Gilbert