[Issue 10524] New: case and with() isn't work together

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 1 17:56:13 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10524

           Summary: case and with() isn't work together
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: 4denizzz at gmail.com


--- Comment #0 from mimocrocodil <4denizzz at gmail.com> 2013-07-01 17:56:12 PDT ---
struct S
{
    int field;
}

void main()
{
    int a = 1;
    S struct_with_long_name;

    switch( a )
    {
        case 0:
            struct_with_long_name.field = 444; // ok
            break;

        with( struct_with_long_name )
        {
            case 1:
                field = 555; // segfault
                break;
        }

        default:
            break;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list