You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/10/01 22:17:48 UTC

[GitHub] [daffodil] mbeckerle commented on a change in pull request #651: WIP: Dynamically loadable aka pluggable Layers

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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org