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

RSRP-289555: False positive NRE (ContractAnnotation on extension method)

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Mar 8, 2012 2:14:57 AM
Updated Mar 8, 2012 2:14:57 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions 7.0
Fixed in build No Fixed in build
[ContractAnnotation("null => true")]
static bool IsNull(this string s)
{
    return s == null;
}

static void Foo([CanBeNull] string s)
{
    if (s.IsNull())
        return;

    var x = s.GetHashCode(); // here
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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