http://d.puremagic.com/issues/show_bug.cgi?id=9566
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from [email protected] 2013-02-21 22:57:51 PST --- (In reply to comment #0) > Seeing is believing. Reduced test case: > ____________________ > > import core.stdc.stdlib; > > struct SZDDFile > { > ExpandData* pExpandData = null; > > struct ExpandData > { > ubyte[4096] window = 0; > } > > void open() > { > pExpandData = cast(ExpandData*) malloc (ExpandData.sizeof); > *pExpandData = ExpandData.init; > } > } > ____________________ > > Error: cannot implicitly convert expression (cast(ubyte)0u) of type ubyte to > ubyte[4096LU] It's not about the surrounding code, but rather, whether or not you use the .init property. Reduced test case: //---- struct ExpandData { ubyte[4096] window = 0; } void main() { ExpandData a; auto b = ExpandData.init; //Comment me. } //---- Works in 2.061, so is a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
