changeset 1316:ffa6691d8f3b

[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:29:03 +0000
parents 37c81d3385b7
children 4df71a8c82f2
files run/n/new_28_D.d
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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 <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_D;
+
+int main(){
+	uint* x = (new uint[](5)).ptr;
+
+	x[0 .. 0] = 1;
+
+	if(*x != 0){
+		assert(0);
+	}
+
+	return 0;
+}