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

Key: RSRP-42156
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Alexander Zverev
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 1
Operations

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

'Generate swith labels' quick-fix generates duplicate case labels

Created: 03 Jun 07 17:57   Updated: 14 Mar 08 11:49
Component/s: Generate Action
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

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

Build: 450


 Description  « Hide
enum E
{
    A,
    B = A,
    C,
    D

}
class Stuff
{
    static void Foo(E e)
    {
        switch(e)
        {
            // Generate switch labels
        }
    }
}

Result:

class Stuff
{
    static void Foo(E e)
    {
        switch(e)
        {
            case E.A:
                break;
            case E.B: // Duplicate case label
                break;
            case E.C:
                break;
            case E.D:
                break;
            default:
                throw new ArgumentOutOfRangeException("e");
        }
    }
}


 All   Comments   Work Log   Change History      Sort Order:
Vladimir Reshetnikov - 14 Mar 08 08:05
Fixed in 748