[Issue 20848] Bug in Nullable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 20 06:42:22 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20848
--- Comment #2 from Victor Porton <porton at narod.ru> ---
The error is here (format.d from phobos):
private void formatValueImpl(Writer, T, Char)(auto ref Writer w, T obj, scope
const ref FormatSpec!Char f)
if (is(DynamicArrayTypeOf!T) && !is(StringTypeOf!T) && !is(T == enum) &&
!hasToString!(T, Char))
{
static if (is(const(ArrayTypeOf!T) == const(void[])))
{
formatValueImpl(w, cast(const ubyte[]) obj, f);
}
else static if (!isInputRange!T)
{
alias U = Unqual!(ArrayTypeOf!T);
static assert(isInputRange!U, U.stringof ~ " must be an InputRange");
U val = obj;
formatValueImpl(w, val, f);
}
else
{
formatRange(w, obj, f);
}
}
In the above code the type immutable(void)[] is forgotten to be considered.
Somebody, please fix it.
--
More information about the Digitalmars-d-bugs
mailing list