import std.stdio; void main() { double[] stuff = [1.,2.,3.,4.,5.]; float[] otherStuff; otherStuff ~= stuff; writeln(otherStuff); } Output: 0 1.875 0 2 0 2.125 0 2.25 0 2.3125
When did this work? I tested back to 2.036 and it still results in the same output (was testing in case it was something I did in my append patch).
You're right. What I can't figure out is how code that depended on this working seemed to work until now. It might have something to do with changes to the Appender struct, since the code that I noticed this in actually used an Appender instead of appending using ~=. Changing status from regression to major.
Wow this is awful.
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/5aa1b47aedf85f9e67132e5fc7a1586d5f1b293a Merge pull request #446 from yebblies/issue3895 This only works because of a bug in dmd, and it was probably supposed to...
Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/4610715c33531a9d11613ab78eec6af70f0f4851 Merge pull request #156 from yebblies/issue3895 This only works because of a bug in dmd, and it was probably supposed to...
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f20d0845f24361463acab77d314170b25b2825c4 fix Issue 3895 - Appending a double[] to a float[] generates wrong code