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

RSRP-288391: Always-false expression is not detected for results of arithmetic operators on nullable integers

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Feb 19, 2012 1:43:13 AM
Updated Mar 28, 2012 7:37:49 PM
Resolved Mar 28, 2012 7:37:49 PM
Priority Normal
Type Bug
Fix versions 7.0
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 Foo(int? x, int? y)
    {
        if (x.HasValue && y.HasValue)
        {
            return;
        }

        int? z = x + y;
        if(z.HasValue) // 'Expression is always false' is not detected
        {
            Console.WriteLine();
        }
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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