http://d.puremagic.com/issues/show_bug.cgi?id=4078
Don <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |[email protected] --- Comment #1 from Don <[email protected]> 2010-05-22 06:56:04 PDT --- This patch also fixes bug 4052 which has the same root cause. PATCH (svn 497): interpret.c, NewExp::interpret, line 1579. return createBlockDuplicatedArrayLiteral(newtype, - newtype->defaultInitLiteral(), lenExpr->toInteger()); + ((TypeArray *)newtype)->next->defaultInitLiteral(), + lenExpr->toInteger()); TEST CASES FOR TEST SUITE: int bug4078() { int[] arr = new int[1]; return arr[0]; } static assert(bug4078() == 0); int bug4052() { int[] arr = new int[1]; int s; foreach (x; arr) s += x; foreach (x; arr) s += x * x; return 4052; } static assert(bug4052() == 4052); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
