digitalmars.D.bugs - [Issue 24644] New: write functions should handle invalid bool values
- d-bugmail puremagic.com (21/21) Jul 02 https://issues.dlang.org/show_bug.cgi?id=24644
https://issues.dlang.org/show_bug.cgi?id=24644 Issue ID: 24644 Summary: write functions should handle invalid bool values specially Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: qs.il.paperinik gmail.com 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. --
Jul 02