Hi,
Adding attributes to ANY is going to break anything based on storables which is the case of AutoTest so this is not surprising. To make AutoTest, you will need to bootstrap EiffelStudio with your modified version of ANY.
As for your previous questions:
- BOOLEAN takes up to 1 byte, however with memory alignment, it might actually add up to 8 bytes on 64-bit machines.
- Due to some optimizations/assumptions on the runtime part, we can only have one reference attribute in the class STRING_xx and ARRAY. This enables some optimizations in accessing the SPECIAL object for fast access to items of a string or an array.
Regards,
Manu
--
For more messaging options, visit this group at http://forum.eiffel.com.
Information on the Eiffelstudio project: http://dev.eiffel.com.
Does this output `999’?
Manu
Are you running this code using the EiffelStudio delivery from Eiffel Software, or your own modified copy?
Then this is normal you are getting 0.
What is happening is that the implementation of `out’ applied to to a reference version of a basic type is simply looking at the first field of the object. If you added a field that happens to be at the place where we expect `item’ to be, then you get 0. When you freeze, we optimize the call to not use the object representation of `n’.
If this is a reference field, you cannot as references always appear before any other fields. Changing the order of fields is actually not recommended as it effects the runtime (garbage collection) and some compiler optimizations.