jadams-tresys commented on code in PR #1283:
URL: https://github.com/apache/daffodil/pull/1283#discussion_r1728064783
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/SequenceGroup.scala:
##########
@@ -164,9 +165,10 @@ abstract class SequenceGroupTermBase(xml: Node,
lexicalParent: SchemaComponent,
protected final lazy val checkIfNonEmptyAndDiscrimsOrAsserts: Unit = {
val msg = "Counterintuitive placement detected. Wrap the discriminator or
assert " +
"in an empty sequence to evaluate before the contents."
- if (groupMembers.nonEmpty && discriminatorStatements.nonEmpty)
+ // Only show warning if the testKind=expression, see DFDL spec Section 9.5
Evaluation Order for Statement Annotations
+ if (groupMembers.nonEmpty && discriminatorStatements.filter(_.testKind ==
TestKind.Expression).nonEmpty)
Review Comment:
Agreed. I always forget about exists()
--
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]