[Issue 9428] New: Wrong array append
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 30 17:17:27 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9428
Summary: Wrong array append
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: major
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-01-30 17:17:24 PST ---
import std.stdio: writeln;
void main() {
int[2][] items = [[1, 2]];
int[2] x = [3, 4];
auto r1 = items ~ [x];
writeln(r1);
auto r2 = items ~ x;
writeln(r2);
}
Output:
[[1, 2], [3, 4]]
[[1, 2], [3, 4], [22683584, 4391680]]
Expected output:
[[1, 2], [3, 4]]
[[1, 2], [3, 4]]
Maybe it's a regression.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list