[Issue 19769] CTFE format(): str[index] is used before initialized

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 5 14:58:35 UTC 2019


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

berni44 <bugzilla at d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at d-ecke.de

--- Comment #1 from berni44 <bugzilla at d-ecke.de> ---
The problem here is, that asCapitalized returns a struct (ToCapitalizerImpl,
which is a range), but the overload of formatValueImpl for structs (instead of
ranges or the more expected strings) is choosen for printing. This wrong
formatValueImpl tries to print all members of the struct, including the
uninitialized ones.

--


More information about the Digitalmars-d-bugs mailing list