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
https://issues.dlang.org/show_bug.cgi?id=18232
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|-
https://issues.dlang.org/show_bug.cgi?id=18232
hst...@quickfur.ath.cx changed:
What|Removed |Added
Keywords||pull
--- Comment #5 from hst...@quic
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
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.
--
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