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

RSRP-288545: NRE warning is not shown after TryGetValue method

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Feb 27, 2012 7:36:00 AM
Updated Feb 27, 2012 7:36:00 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
using System.Collections.Generic;

class C
{
    static void Foo(Dictionary<string, object> d)
    {
        object value;
        if(d.TryGetValue("key", out value))
        {
            return;
        }

        var s = value.ToString(); // NRE warning expected
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles