[Issue 7358] `final switch` over enum should add throwing default in debug mode at least

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 5 06:14:39 PST 2012


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2012-02-05 06:14:36 PST ---
(In reply to comment #1)
> https://github.com/D-Programming-Language/dmd/pull/673

I don't like it. There are better solutions, like:
is(typeof(E.a | E.b) == int)

This means f(E.a | E.b) becomes a compile-time error, a type mismatch.

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