rsdn/nemerle — Issue #159: long overflow
Author: zyhong
Created: 2011-10-25 04:51:01+00:00
State: open

class Program
{
static void Main(string[] args)
{
long l = 9223372036854775807L;
//get -9223372036854775808 compiled from MS compiler
//get overflow exception compiled from nemerle
System.Console.WriteLine((l + 1).ToString());
System.Console.WriteLine("press any key");
System.Console.ReadLine();
}
}

the code generated by MS compiler does not throw exception on long overflow while ncc throw overflow exception