mike-mcgann commented on code in PR #918:
URL: https://github.com/apache/daffodil/pull/918#discussion_r1081402184


##########
daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala:
##########
@@ -103,6 +103,14 @@ trait ElementBaseGrammarMixin
 
   lazy val prefixedLengthElementDecl: PrefixLengthQuasiElementDecl = 
LV('prefixedLengthElementDecl){
     Assert.invariant(lengthKind == LengthKind.Prefixed)
+    optPrimType match {
+      case Some(primType) => primType match {
+        case PrimType.Integer | PrimType.NonNegativeInteger if lengthUnits == 
LengthUnits.Bits =>

Review Comment:
   I think so. I wrote the test first to see if prefixed would work as expected 
with the other change and it didn't. My understanding is that there are two 
types here, the type of the element itself and the type of the prefix. This 
case checks the type of the element itself and the later check is for the 
prefix type. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to