[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/29c1e309be359f871d4052c025f7f3144005d092 Fix issue 18232: local vars in union member functions needs in

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|-

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #5 from hst...@quic

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #4 from hst...@quickfur.ath.cx --- More interesting clues: running a union method inside CTFE containing a local variable without an explicit initializer causes a CTFE error "cannot modify variable at compile time", whereas explicitly init

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #3 from hst...@quickfur.ath.cx --- Minimized code: -- union U { int method() { int x; return x; } } -- The disassembly shows that x is never initialized to 0, and a garbage value is returned. --

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 hst...@quickfur.ath.cx changed: What|Removed |Added Summary|string variable in toString |Union methods fail to