--- Comment #2 from Andrej Mitrovic <> 2012-01-21 
17:53:28 PST ---
I think what's going on is DMD figures out the literal can fit into an int and
does the optimization where it converts it into an int behind the scenes. 

Proof is in the pudding:

import std.stdio;
import foo;
import bar;

void main()
    long x;
    fun(cast(long)2147483648);  // ok, int.max is 2147483647, overflows to long
    fun(cast(long)2147483647);  // error, no overflow and literal stored as int

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to