You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Josh Adams (JIRA)" <ji...@apache.org> on 2019/02/14 12:30:00 UTC
[jira] [Assigned] (DAFFODIL-2065) Incorrectly attempting to cast
signed to unsigned type
[ https://issues.apache.org/jira/browse/DAFFODIL-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Adams reassigned DAFFODIL-2065:
------------------------------------
Assignee: Josh Adams
> Incorrectly attempting to cast signed to unsigned type
> ------------------------------------------------------
>
> Key: DAFFODIL-2065
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2065
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 2.2.0
> Environment: Ubuntu 18.04.1 LTS
> Reporter: Brandon Sloane
> Assignee: Josh Adams
> Priority: Major
> Attachments: test.dfdl.xsd
>
>
> 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:
> {quote}[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.xsd
> The relevent piece of schema is:
> <xs:element name="x" type="xs:int" dfdl:inputValueCalc="\{ xs:unsignedInt(1) + (-1) }" />
> {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)