automatic int to short conversion - the HELL?

downs default_357-line at yahoo.de
Wed Sep 17 21:13:53 PDT 2008


Jarrett Billingsley wrote:
> On Wed, Sep 17, 2008 at 10:26 PM, downs <default_357-line at yahoo.de> wrote:
>> void main() { int i; short x; x = i; }
>>
>> Excuse me, but - how exactly is it that this is in any way, shape or form valid code?
>>
>> How can I trust a language that allows those kind of shenanigans?
>>
> 
> lern2warningsflag.

"Warning. Your code is broken."

I still claim it should actually be an error, although the only practical and correct solution might be full ranged type support.


More information about the Digitalmars-d-learn mailing list