错误报告:uint的无法访问断言>为0x80000000

问题描述:

当前版本的代码合同将报告以下代码中的断言无法访问:

The current release of code contract will report the assertion in the following code is unreachable:

class Program
{
    public static uint Test()
    {
        return 0x80123456;
    }

    static void Main(string[] args)
    {
        var t = Test();
        if (t == 0x80123456)
        {
            Contract.Assert(true);
        }
    }
 }

在我看来,代码合同中可能存在错误当处理uint时> 0x80000000;

It seems to me that there might be a bug in code contract when handling uint > 0x80000000;

是的,这是一个我们应该尽快解决的错误。

yep, it is a bug that we should fix asap.

感谢报告

f