jadams-tresys commented on a change in pull request #262: Unordered sequences
URL: https://github.com/apache/incubator-daffodil/pull/262#discussion_r320260601
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/AlignedMixin.scala
##########
@@ -260,6 +285,7 @@ trait AlignedMixin extends GrammarMixin { self: Term =>
case LengthKind.Prefixed => LengthMultipleOf(1) // NYI
}
}
+ case mg: ModelGroup => LengthMultipleOf(1)
Review comment:
So, this code path is actually getting hit by a negative test that is trying
to trigger an SDE. The test has an unordered sequence containing a choice,
which is not allowed. So what I think is happening is that the we are
attempting to get the elementSpecifiedLengthApprox of this choice.
I think the proper fix for this is to use the Assert.usageError for now, and
handle this case in the SequenceGrammarMixin so that it doesn't even try to
make a SequenceChild from the ModelGroup in an unordered sequence.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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