mbeckerle commented on a change in pull request #262: Unordered sequences
URL: https://github.com/apache/incubator-daffodil/pull/262#discussion_r318258034
 
 

 ##########
 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:
   This may only be called for elements, but it is defined in AlignedMixin, so 
this is a term, not just an element. 
   Some refactoring may fix this. I.e., splitting the aligned mixin into a 
general aligned mixin that is mixed into model groups and an aligned element 
mixin that extends it which is mixed into elements. 
   
   Alternatively, if this is only supposed to be called for elements we should 
change the model-group case to do Assert.usageError("Only for elements.") this 
is the quick way to insure this is only called for elements, but splitting the 
mixin so this method is only available on elements is a better fix. 

----------------------------------------------------------------
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

Reply via email to