Bug 9428 – Wrong array concatenation

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-30T17:17:00Z
Last change time
2013-02-18T20:31:06Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-01-30T17:17:24Z
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.
Comment #1 by Oleg.Kuporosov — 2013-01-31T21:56:50Z
both 2.059 and 2.060 have showed the same output as 2.061, so it is not regression agaist it.
Comment #2 by k.hara.pg — 2013-01-31T23:51:43Z
https://github.com/D-Programming-Language/dmd/pull/1590 It is an issue of dmd glue layer, so did not belongs to druntime.
Comment #3 by github-bugzilla — 2013-02-18T20:30:55Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/976ddc082ef8f74ff9bae199cb9289d0e1d1b4ca fix Issue 9428 - Wrong array concatenation https://github.com/D-Programming-Language/dmd/commit/7b2bc9bab72eb11ec3f89f67190578eaf7f98ead Merge pull request #1590 from 9rnsr/fix9428 Issue 9428 - Wrong array concatenation