The implementation of 'coerce' needs a review
The implementation is very simple: size is changed, extra bits are set to zero.
Sign extension is not supported, which causes bugs. Also, conversion from different data type families (e.g float to integer is not supported)/
Updated by Andrei Tatarnikov almost 5 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
See r4613 and r4638.
Implementation was reviewed:
- Currently, coercion is supported for INT, CARD and BOOLEAN. For all other types an exception is raised.
- Sign extension is done on coercion to INT (signed integer). In all other cases, zero extension is performed.
Support for other types will be implemented when we face such a need.