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

RSRP-288407: 'Expression is always true' is not detected based on 'is' check on type parameter with 'struct' constraint

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Feb 20, 2012 3:14:45 AM
Updated Feb 20, 2012 3:14:45 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
static void Foo<T>(T x, T y) where T : struct 
{
    if(x is int)
    {
        if(y is int) // 'Expression is always true' is not detected
        {
        }

        if (y is long) // 'Expression is always false' is not detected
        {
        }
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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