Description
When adding a signed and unsigned type, Daffodil attempts to cast the signed value to unsigned. The correct behaviour would be to cast the unsigned to signed.
When running the attached schema on an empty file, the following error is produced:
[error] Schema Definition Error: Cannot convert '-1' from Long type to UnsignedInt (Negative value -1 cannot be converted to an unsigned int.).
Schema context: element reference tns:x Location line 3 in file:/home/bsloane/Documents/incubator-daffodil/test/test.dfdl.xsdThe relevent piece of schema is:
<xs:element name="x" type="xs:int" dfdl:inputValueCalc="{ xs:unsignedInt(1) + (-1) }" />