[Issue 7320] New: final switch on enum with backing type not statically checked

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 19 09:13:53 PST 2012


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

           Summary: final switch on enum with backing type not statically
                    checked
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: xtzgzorex at gmail.com


--- Comment #0 from Alex Rønne Petersen <xtzgzorex at gmail.com> 2012-01-19 09:13:51 PST ---
This builds:

enum Test : ubyte
{
    foo,
    bar,
    baz,
}

void main()
{
    auto i = Test.bar;

    final switch (i)
    {
        case Test.foo:
            break;
    }
}

Remove the : ubyte and it doesn't.

-- 
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