# HG changeset patch # User thomask # Date 1167575343 0 # Node ID ffa6691d8f3b75d23bc9899ea1429d707bf98eb8 # Parent 37c81d3385b797133d024cf12cce231f3d6e8eb4 [Issue 765] ArrayBoundsError when assigning slice of pointer Frits van Bommel 2006-12-28 http://d.puremagic.com/issues/show_bug.cgi?id=765 diff -r 37c81d3385b7 -r ffa6691d8f3b run/n/new_28_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/n/new_28_D.d Sun Dec 31 14:29:03 2006 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Frits van Bommel +// @date@ 2006-12-28 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=765 +// @desc@ [Issue 765] ArrayBoundsError when assigning slice of pointer + +module dstress.run.n.new_28_D; + +int main(){ + uint* x = (new uint[](5)).ptr; + + x[0 .. 0] = 1; + + if(*x != 0){ + assert(0); + } + + return 0; +}