[Issue 18232] string variable in toString method of Union: invalid code (crash/segfault)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 12 18:25:07 UTC 2018


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

--- Comment #2 from hsteoh at quickfur.ath.cx ---
Note also, the name `toString` is irrelevant to this bug.  The same codegen bug
appears if you rename the method to something else, like 'member'.

Furthermore, the local variable doesn't have to be a string; any local variable
without an initializer would also exhibit the same missing initialization, it
doesn't initialize the local to .init, as it should.

--


More information about the Digitalmars-d-bugs mailing list