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

RSRP-122214: [Type tracking] Use knowledge about types in analysis of reference equality operators and invocations of ReferenceEquals method

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Sep 22, 2009 1:56:15 AM
Updated Jan 20, 2012 7:11:55 PM
Resolved Jan 20, 2012 2:47:14 PM
Priority Normal
Type Feature
Fix versions Next
State Fixed
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build 6.5.1.2889
static void Foo(object x, object y)
{
	if(x is string && y is Exception)
	{
		if(x == y) // Expression is always false, because x and y are known to be of incompatible types and cannot refer to the same object
		{
			
		}
		if(ReferenceEquals(x, y)) // Expression is always false
		{
			
		}
	}
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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