Steps to reproduce
- Create a new project
- From the Explorer, on the main
Package1, select New object from text
- Enter the text below and validate.
import ScalarValues::*;
import NumericalFunctions::*;
constraint def MassConstraint {
in totalMass : Real;
in partMasses : Real[0..*];
totalMass == sum(partMasses)
}
Expected result
The new constraint def is imported without errors and the result model is conform to the text.
Actual result
The import process shows 2 errors, which seem to indicate that when paring the totalMass == sum(partMasses) result expression, the two locally-defined features totalMass and partMasses are not resolved.
Unable to resolve name 'totalMass' for reference 'memberElement' on element '[Membership] Package1::MassConstraint::<ResultExpressionMembership>::<OperatorExpression>::<ParameterMembership>::<Feature>::<FeatureValue>::<FeatureReferenceExpression>::<Membership>'
Unable to resolve name 'partMasses' for reference 'memberElement' on element '[Membership] Package1::MassConstraint::<ResultExpressionMembership>::<OperatorExpression>::<ParameterMembership>::<Feature>::<FeatureValue>::<InvocationExpression>::<ParameterMembership>::<Feature>::<FeatureValue>::<FeatureReferenceExpression>::<Membership>'
Indeed, in the resulting model, for the result expression we see the equivalent of <unresolved Feature Reference Expression> == sum(<unresvoled Feature Reference Expression>).
Steps to reproduce
Package1, select New object from textExpected result
The new constraint def is imported without errors and the result model is conform to the text.
Actual result
The import process shows 2 errors, which seem to indicate that when paring the
totalMass == sum(partMasses)result expression, the two locally-defined featurestotalMassandpartMassesare not resolved.Indeed, in the resulting model, for the result expression we see the equivalent of
<unresolved Feature Reference Expression> == sum(<unresvoled Feature Reference Expression>).