Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288269: False 'Expression is always true'

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Feb 13, 2012 4:23:06 AM
Updated Feb 13, 2012 5:08:04 PM
Resolved Feb 13, 2012 5:08:03 PM
Priority Normal
Type Bug
Fix versions Next
State Fixed
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build

using System;

class Program
{
    static void Main()
    {
        Console.WriteLine(Test(-1));
    }

    static bool Test(int x)
    {
        return unchecked(x == (ushort) x); // False 'Expression is always true'
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>