writeln is not aware of anonymous unions inside of structs (probably classes too). The attached file crashes when run.
Created attachment 1068 [details] bug test case
Code copied here to increase its visibility: import std.stdio; struct Bug7230 { union { string a; int b; } } void main() { Bug7230 bug; bug.b = 123; writeln(bug); }
https://github.com/D-Programming-Language/phobos/pull/383 The format implemented the patch is not yet determined. Please comment your opinion.
(In reply to comment #3) > https://github.com/D-Programming-Language/phobos/pull/383 > > The format implemented the patch is not yet determined. > Please comment your opinion. Thank you for improving writeln. Maybe the string tag "union" is better than "overlap": Bug7230("hello", #{union a, b, c}, 10)
https://github.com/D-Programming-Language/phobos/commit/1d2962b4a19dbd40ab6269539bb3382ed0b9f6c5
*** Issue 7324 has been marked as a duplicate of this issue. ***