Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Alexander Zverev 
Subsystem
No subsystem 
Affected versions
Fixed in
Fixed in build
Next build 
Build
545
Fixed in build
900
  • Submitted by   Vladimir Reshetnikov
    2 years ago (19 Oct 2007 18:51)
  • Updated by Vladimir Reshetnikov
    20 months ago (07 Jun 2008 17:20)
  • Jira: RSRP-51504
    (history, comments)

RSRP-51504

'Move to outer scope' breaks code

0
using System;

class Program
{
    static void Main()
    {
        using (IDisposable x = null, y = null)
            Console.WriteLine(x);
    }
}


Put the caret onto unused variable 'y' and invoke 'Move to outer scope'.

using System;

class Program
{
    static void Main()
    {
        IDisposable y;
        using (y = null)
            Console.WriteLine(x); // error CS0103: The name 'x' does not exist in the current context
    }
}


Issue was closed
Comments (0)
 
History (0)
 
Links
 
Issue has no comments