stevedlawrence commented on a change in pull request #55: Fixes the issue of separated empty optional elements, (ie. 1:2::4:5). URL: https://github.com/apache/incubator-daffodil/pull/55#discussion_r175473792
########## File path: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ElementKindUnparsers.scala ########## @@ -54,25 +54,22 @@ class SequenceCombinatorUnparser(ctxt: ModelGroupRuntimeData, childUnparsers: Ve override def nom = "Sequence" - // Sequences of nothing (no initiator, no terminator, nothing at all) should - // have been optimized away - Assert.invariant(childUnparsers.length > 0) - // Since some of the grammar terms might have folded away to EmptyGram, // the number of unparsers here may be different from the number of // children of the sequence group. - Assert.invariant(ctxt.groupMembers.length >= childUnparsers.length) + Assert.invariant(ctxt.groupMembers.length == childUnparsers.length) Review comment: This doesn't match the above comment, and also seems odd. If the SequenceCombinatorUnparser is filtering out emptry grammars, then it seems reasonable that there might be childUnparsers than groupMembers. Or does this mean things aren't being filtered out now? ---------------------------------------------------------------- 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
