Comment #0 by qs.il.paperinik — 2024-07-02T16:16:56Z
Functions of the family write(f)?(ln)? should handle invalid `bool` values (i.e. ones whose bit pattern isn’t `0x00` or `0x01`) by printing `__bool(0x??)` with `??` replaced by the hex value. For formatted write functions, that applies to the `%s` format. Numeric formats such as `%d`, `%x`, etc., already print the correct (bit-pattern) value.
This would make debugging invalid bool values a lot easier.
Comment #1 by dlang-bot — 2024-07-02T16:28:49Z
@Bolpat created dlang/phobos pull request #9021 "Write functions should handle invalid bool values properly" fixing this issue:
- Fix Bugzilla Issue 24644 - write functions should handle invalid bool values specially
https://github.com/dlang/phobos/pull/9021