[Issue 20848] Bug in Nullable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 20 06:22:51 UTC 2020


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

--- Comment #1 from Victor Porton <porton at narod.ru> ---
A simpler test case:

///////////////////////////////
import std.typecons;

struct MoFile {
    immutable(void)[] data;
}

Nullable!MoFile mo;
///////////////////////////////

$ dmd test.d 
/snap/dmd/102/bin/../import/phobos/std/format.d(3217): Error: static assert: 
"immutable(void)[] must be an InputRange"
/snap/dmd/102/bin/../import/phobos/std/format.d(1875):        instantiated from
here: formatValueImpl!(Appender!string, immutable(void)[], char)
/snap/dmd/102/bin/../import/phobos/std/format.d(3749):        instantiated from
here: formatValue!(Appender!string, immutable(void)[], char)
/snap/dmd/102/bin/../import/phobos/std/format.d(4451):        instantiated from
here: formatElement!(Appender!string, immutable(void)[], char)
/snap/dmd/102/bin/../import/phobos/std/format.d(1875):        ... (2
instantiations, -v to show) ...
/snap/dmd/102/bin/../import/phobos/std/typecons.d(2791):        instantiated
from here: toString!(Appender!string)
test.d(7):        instantiated from here: Nullable!(MoFile)

--


More information about the Digitalmars-d-bugs mailing list