[Issue 12616] AssertError in std.utf.decode
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 23 12:08:19 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12616
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com,
| |monarchdodra at gmail.com
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Interesting problem. I think decode is wrong in using asserts here. asserts are
for checking program state, enforce is for checking input. So I think the
assert should be changed to:
enforceEx!UTFException(isValidDchar(result));
Or something similar. monarchdodra what do you think?
--
More information about the Digitalmars-d-bugs
mailing list