[Issue 19087] `final switch` cannot be used in -betterC
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 15 23:38:04 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19087
Seb <greensunny12 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |greensunny12 at gmail.com
--- Comment #1 from Seb <greensunny12 at gmail.com> ---
> It should probably be an `assert`.
Agreed! `final switch` is actually usable in `nothrow` code (see e.g.
https://run.dlang.io/is/mjVbPr), s.t. there's no reason to throw an exception.
Also programming errors are typically handled by `assert`.
--
More information about the Digitalmars-d-bugs
mailing list