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

RSRP-283822: False 'Redundant qualifier', removing it introduces a name conflict

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Nov 29, 2011 2:00:37 AM
Updated Dec 2, 2011 2:53:18 PM
Resolved Dec 2, 2011 2:53:18 PM
Priority Normal
Type Bug
Fix versions 6.1
State Fixed
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build 6.1.21.163
class Program
{
    class Foo
    {
        public static void Bar() { }
    }

    static void Main()
    {
        Program.Foo.Bar(); // 'Program.' is reported as redundant here

        {
            int Foo;
        }
    }
}


After QF:

class Program
{
    class Foo
    {
        public static void Bar() { }
    }

    static void Main()
    {
        Foo.Bar();

        {
            int Foo; // error CS0136: A local variable named 'Foo' cannot be declared in this scope because it would give a different meaning to 'Foo', which is already used in a 'parent or current' scope to denote something else
        }
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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