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


##########
daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_expressions/expressions2.tdml:
##########
@@ -218,7 +218,7 @@
     <tdml:errors>
       <tdml:error>Schema Definition Error</tdml:error>
       <tdml:error>If-expression branches must have similar types</tdml:error>
-      <tdml:error>Decimal</tdml:error>
+      <tdml:error>Double</tdml:error>

Review Comment:
   Yeah, but backwards--it's because unsignedByte is not a *parent type* of 
nonNegativeInteger, or interpreted the other way around, nonNegative integer is 
not a subtype of unsignedByte. Note that unsignedByte *is* a subtype of 
non-negative integer.
   
   The only things we promote to Decimal are decimal, integer, and 
nonNegativeInteger, which are all considered parents types of 
nonNegativeInteger. Or read the other way (and the logic the change uses), 
nonNegativeInteger is a subtype of Decimal, integer and non-negative integer.



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