mbeckerle commented on a change in pull request #44: Handle ChoiceGroups
correctly in immediatelyEnclosingModelGroup
URL: https://github.com/apache/incubator-daffodil/pull/44#discussion_r168802619
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/Term.scala
##########
@@ -230,6 +230,7 @@ trait Term
Assert.invariant(this.isInstanceOf[Root])
None
}
+ case gcgd: GlobalChoiceGroupDef => Some(gcgd.groupRef.asModelGroup)
Review comment:
What you fixed is that this was providing not the enclosing model group, but
2-enclosings out, in the case where the term was the model-group of a global
group definition.
The same bug is here for sequences.
Change the line below for parent is a GlobalGroupDef:
case ggd: GlobalGroupDef => Some(ggd.groupRef.asModelGroup)
This subsumes your change line, so you can remove that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services