mbeckerle commented on a change in pull request #259: Incremental progress on 
schema compilation space/speed issue.
URL: https://github.com/apache/incubator-daffodil/pull/259#discussion_r302105228
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
 ##########
 @@ -943,155 +950,148 @@ sealed abstract class StepExpression(val step: String, 
val pred: Option[Predicat
     NodeInfo.ArrayIndex
   }
 
+}
+
+sealed abstract class DownStepExpression(s: String, predArg: 
Option[PredicateExpression])
+  extends StepExpression(s, predArg) {
+
   override lazy val inherentType: NodeInfo.Kind = {
     if (!isLastStep) NodeInfo.Complex
     else {
-      if (stepElement.optPrimType.isDefined) {
+      if (stepElements.head.optPrimType.isDefined) {
 
 Review comment:
   Good points. 
   
   I am not sure we're really looking at a regression here. I am not sure any 
expressions in any DFDL schemas require any polymorphism even though they 
theoretically could. 
   
   That said, I suppose the right algorithm is just to generalize the types. So 
if ../foo is int in some places and float in others and string in others, then 
the least upper bound is AnySimpleType for those. Then the DPath compiler would 
error if that expression appeared in a context where AnySimpleType isn't 
sufficient. So fn:localName(../foo) would work, but ../foo + 7 would fail to 
compile. 
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to