Thread overview
[Issue 9368] New: Final swith typedef'ed enum is not properly checked
Jan 22, 2013
Andrej Mitrovic
[Issue 9368] Final switch on typedef'ed enum is not properly checked
Jan 22, 2013
Andrej Mitrovic
Jan 28, 2013
Kenji Hara
January 22, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9368

           Summary: Final swith typedef'ed enum is not properly checked
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid, pull
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: andrej.mitrovich@gmail.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-22 10:50:04 PST ---
enum E
{
    a,
    b
}

void main()
{
    typedef E F;
    F f;
    final switch (f)
    {
        case F.a:
    }
}

$ dmd -d test.d
> 

It should error about a missing case. It's due to a typo in SwitchStatement::semantic, a pull is coming shortly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 22, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9368



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-22 10:55:42 PST ---
https://github.com/D-Programming-Language/dmd/pull/1534

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 28, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9368



--- Comment #2 from github-bugzilla@puremagic.com 2013-01-28 06:06:53 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1be6b753f8431e5023b9e0bcb113bbb217bfdfc3 Fixes Issue 9368 - Final switch on typedef'ed enum is not properly checked

https://github.com/D-Programming-Language/dmd/commit/16587559891280c9a21a648bc39a3d3b4b7c49f5 Merge pull request #1534 from AndrejMitrovic/Fix9368

Issue 9368 - Final switch on typedef'ed enum is not properly checked

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 28, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9368


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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