stevedlawrence commented on code in PR #1187:
URL: https://github.com/apache/daffodil/pull/1187#discussion_r1528964531


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/runtime1/VariableRuntime1Mixin.scala:
##########
@@ -98,7 +100,10 @@ trait DFDLNewVariableInstanceRuntime1Mixin { self: 
DFDLNewVariableInstance =>
       defv.namedQName.asInstanceOf[GlobalQName],
       defv.primType,
       this.tunable.unqualifiedPathStepPolicy,
-      this.schemaSet.allDefinedVariables.indexOf(defv),
+      // This is a really important invariant. The index of the NVI's VRD
+      // must be identical to that of the global VRD for this variable,
+      // So we take it from there.
+      vmapIndex = globalVRD.vmapIndex,

Review Comment:
   Ok, good to know. And this is definitely an improvement. Agreed removing the 
distinction between NVI VRD vs global VRD is can be postponed, if ever done.



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