mbeckerle commented on code in PR #1137:
URL: https://github.com/apache/daffodil/pull/1137#discussion_r1462383750


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dpath/Expression.scala:
##########
@@ -2295,6 +2295,18 @@ abstract class FunctionCallBase(
     res
   }
 
+  final def checkArgArray(): Unit = {
+    lazy val isArray = expressions.head match {
+      case rpe: RelativePathExpression => rpe.steps.last.isArray
+      case rpe: RootPathExpression => rpe.steps.last.isArray
+      case _ => true

Review Comment:
   An if-then-else propagates the type needed by the surrounding context of the 
if-then-else and repeats it for the 'then' and 'else' subexpressions:
   ```  
   override def targetTypeForSubexpression(subexp: Expression) = {
       Assert.invariant(children.contains(subexp))
       if (subexp == predicate)
         NodeInfo.Boolean
       else
         this.targetType
     }
   ```
   But I looked at every occurrence of "count(" in the code base and none of 
them contain an if-then-else, so we need to add a test. 



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