mbeckerle commented on a change in pull request #651:
URL: https://github.com/apache/daffodil/pull/651#discussion_r720559120



##########
File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/RuntimePropertyMixins.scala
##########
@@ -725,26 +724,6 @@ trait SequenceRuntimeValuedPropertiesMixin
 trait LayeringRuntimeValuedPropertiesMixin
   extends RawLayeringRuntimeValuedPropertiesMixin { decl: SequenceTermBase =>
 
-  private lazy val layerTransformExpr = {

Review comment:
       Note: dfdlx:layerTransform no longer takes an expression. This enables 
compile-time analysis of layer properties. 

##########
File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/SequenceGrammarMixin.scala
##########
@@ -47,7 +47,11 @@ trait SequenceGrammarMixin
       groupMembers.mkString(", "))
     val term = groupMembers(0)
     schemaDefinitionWhen(term.isArray, "Layered sequence body cannot be an 
array.")
-    LayeredSequence(this, new ScalarOrderedSequenceChild(this, term, 1)) // We 
use 1-based indexing for children.
+    this match {
+      case sgtb: SequenceGroupTermBase =>
+        LayeredSequence(sgtb, new ScalarOrderedSequenceChild(this, term, 1)) 
// We use 1-based indexing for children.
+      case _ => Assert.invariantFailed("Layered sequences must be 
SequenceGroupTermBase, not just SequenceTermBase")

Review comment:
       Add COVERAGE-OFF/ON.




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