view run/n/new_28_B.d @ 1315:37c81d3385b7

[Issue 765] ArrayBoundsError when assigning slice of pointer Frits van Bommel <fvbommel@wxs.nl> 2006-12-28 http://d.puremagic.com/issues/show_bug.cgi?id=765
author thomask
date Sun, 31 Dec 2006 14:28:54 +0000
parents
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Frits van Bommel <fvbommel@wxs.nl>
// @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_B;

int main(){
	uint* x = (new uint[](5)).ptr;

	x[0 .. 0] = 1;

	if(*x != 0){
		assert(0);
	}

	return 0;
}