changeset 1187:69d80e62f44c

[Issue 411] New: array alloc with size from another array Frank Benoit <benoit@tionex.de> 2006-10-09 news:bug-411-3@http.d.puremagic.com/issues/
author thomask
date Thu, 12 Oct 2006 15:01:24 +0000
parents 6e7b74e51c23
children e2141455b0e4
files run/a/array_initialization_28_A.d run/a/array_initialization_28_B.d run/a/array_initialization_28_C.d
diffstat 3 files changed, 72 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_28_A.d	Thu Oct 12 15:01:24 2006 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frank Benoit <benoit@tionex.de>
+// @date@	2006-10-09
+// @uri@	news:bug-411-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 411] New: array alloc with size from another array
+
+module dstress.run.a.array_initialization_28_A;
+
+int main(){
+	int[] asso;
+	asso ~= 3;
+
+	byte[] x = new byte[](asso[0]);
+
+	if(x.length != 3){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_28_B.d	Thu Oct 12 15:01:24 2006 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frank Benoit <benoit@tionex.de>
+// @date@	2006-10-09
+// @uri@	news:bug-411-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 411] New: array alloc with size from another array
+
+module dstress.run.a.array_initialization_28_B;
+
+int main(){
+	int[] asso;
+	asso ~= 3;
+
+	byte[] x = new byte[(asso[0])];
+
+	if(x.length != 3){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_28_C.d	Thu Oct 12 15:01:24 2006 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frank Benoit <benoit@tionex.de>
+// @date@	2006-10-09
+// @uri@	news:bug-411-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 411] New: array alloc with size from another array
+
+module dstress.run.a.array_initialization_28_C;
+
+int main(){
+	int[] asso;
+	asso ~= 3;
+
+	byte[] x = new byte[asso[0]];
+
+	if(x.length != 3){
+		assert(0);
+	}
+
+	return 0;
+}
+