stevedlawrence commented on code in PR #1336:
URL: https://github.com/apache/daffodil/pull/1336#discussion_r1797118565
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala:
##########
@@ -1007,13 +1007,19 @@ trait ElementBase
"The length facet or minLength/maxLength facets are not allowed on
types derived from type %s.\nThey are allowed only on types derived from string
and hexBinary.",
pt.name
)
- val res = (hasLength, hasMinLength, hasMaxLength, lengthKind) match {
- case (true, false, false, _) => (r.lengthValue, r.lengthValue)
- case (true, _, _, _) =>
+ val res = (
+ hasLength,
+ hasMinLength,
+ hasMaxLength,
+ lengthKind,
+ inputValueCalcOption.isDefined
Review Comment:
It's better to use isRepresented to determine if something is IVC or not.
--
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]