[Issue 13163] std.conv.parse misses overflow when it doesn't result in a smaller value

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 20 03:26:41 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13163

Nils <nilsbossung at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std.conv.parse misses       |std.conv.parse misses
                   |overflow when it results in |overflow when it doesn't
                   |the same value              |result in a smaller value

--- Comment #2 from Nils <nilsbossung at googlemail.com> ---
Another test case by monarchdodra showing that the overflowed value can be
greater than the original (duh):

import std.conv;
import std.exception;
void main()
{
    auto s = "123";
    assertThrown!ConvOverflowException(s.parse!ubyte(16)); /* fails */
}

--


More information about the Digitalmars-d-bugs mailing list