action def ActionDef1 {
action a2;
action a1;
then a2; // Equivalent of first a1 then a2;
}
{
"$type": "SuccessionAsUsage",
"ends": [
{
"$type": "EndFeatureMembership",
"$cstNode": {
"text": "then a2",
"stack": [
"TargetSuccession",
"ActionTargetSuccession"
]
},
"isAlias": false,
"elements": [],
"target": {
"$type": "Feature", // <- Here is the strange structure
"$cstNode": {
"text": "then a2",
"stack": [
"TargetSuccession",
"ActionTargetSuccession"
]
},
"isNonunique": false,
"isOrdered": false,
"heritage": [],
"isSufficient": false,
"typeRelationships": [],
"children": [],
"prefixes": [],
"$meta": {
"elementId": 540595,
"qualifiedName": ""
}
},
"$meta": {
"elementId": 540594,
"qualifiedName": ""
}
},
{
"$type": "EndFeatureMembership",
"target": {
"$type": "ReferenceUsage",
"heritage": [
{
"$type": "ReferenceSubsetting",
"targetRef": {
"$type": "FeatureReference",
"$cstNode": {
"text": "a2",
"stack": [
"FeatureReference",
"OwnedReferenceSubsetting"
]
},
"text": "a2",
"reference": "ActionDef1::a2",
"parts": [
"ActionDef1::a2"
]
},
"$cstNode": {
"text": "a2",
"stack": [
"OwnedReferenceSubsetting",
"ConnectorEnd"
]
},
"elements": [],
"$meta": {
"elementId": 540598,
"qualifiedName": ""
}
}
],
"$cstNode": {
"text": "a2",
"stack": [
"ConnectorEnd",
"ConnectorEndMember"
]
},
"isIndividual": false,
"isReference": false,
"isVariation": false,
"isNonunique": false,
"isOrdered": false,
"isSufficient": false,
"typeRelationships": [],
"children": [],
"prefixes": [],
"$meta": {
"elementId": 540597,
"qualifiedName": ""
}
},
"$cstNode": {
"text": "a2",
"stack": [
"ConnectorEndMember",
"TargetSuccession"
]
},
"isAlias": false,
"elements": [],
"$meta": {
"elementId": 540596,
"qualifiedName": ""
}
}
],
"$cstNode": {
"text": "then a2;",
"stack": [
"ActionTargetSuccession",
"TargetSuccessionMember"
]
},
"elements": [],
"isIndividual": false,
"isReference": false,
"isVariation": false,
"isNonunique": false,
"isOrdered": false,
"heritage": [],
"isSufficient": false,
"typeRelationships": [],
"children": [],
"prefixes": [],
"$meta": {
"elementId": 540593,
"qualifiedName": ""
}
}
Make the AST produce the same structure for the first and second `EndFeatureMembership (without reference resolution for the first one).
Checklist before submitting a bug report
CONTRIBUTING.mddocumentContext
I'm analyzing the AST of a simple use case:
Steps to reproduce the bug
Import that example and dump the AST using SysIDE
Current result
I'm surprise by produced AST for the SuccessionAsUsage:
Expected result
The first
EndFeatureMembershipcontains aFeaturewhereas the second contains what seems to me a the correct structure forReferenceUsage/ReferenceSubsettingthat reference "ActionDef1::a2".I would have expected the first
EndFeatureMembershipto have the same structureReferenceUsage/ReferenceSubsettingwithout the resolved reference to the feature since in that case the target is implicit (previous feature of the owningNamespace of the SucessionUsage).Possible fix
Make the AST produce the same structure for the first and second `EndFeatureMembership (without reference resolution for the first one).
Technical data
/label ~"bug report"