History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-32500
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

'Inline variable' produces code with unexpected tokens

Created: 27 Nov 06 10:25   Updated: 24 Jan 08 18:13
Component/s: Refactorings - Inline Variable
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 311


 Description  « Hide
delegate void Foo();
class Stuff
{
    static void Foo()
    {
        Foo x = (Foo);
        x();
    }
}

Try to inline variable 'x'.

delegate void Foo();
class Stuff
{
    static void Foo()
    {
        (Foo)(); // error CS1525: Invalid expression term ')'
    }
}

Expected:

delegate void Foo();
class Stuff
{
    static void Foo()
    {
        ((Foo)(Foo))();
    }
}

or:

delegate void Foo();
class Stuff
{
    static void Foo()
    {
        Foo();
    }
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.