changeset 1323:2ff35944af8e

[Issue 748] internal error with mixed static / dynamic array Bill Baxter <wbaxter@gmail.com> 2006-12-25 http://d.puremagic.com/issues/show_bug.cgi?id=748
author thomask
date Mon, 01 Jan 2007 16:24:15 +0000
parents a8cf8aa0da50
children a16119ef8f21
files run/o/opCatAssign_21_A.d run/o/opCatAssign_21_B.d
diffstat 2 files changed, 58 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/opCatAssign_21_A.d	Mon Jan 01 16:24:15 2007 +0000
@@ -0,0 +1,29 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bill Baxter <wbaxter@gmail.com>
+// @date@	2006-12-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=748
+// @desc@	[Issue 748] internal error with mixed static / dynamic array
+
+module dstress.run.o.opCatAssign_21_A;
+
+int main(){
+	int[2][] a;
+	a ~= [3, 4];
+	if(a.length != 1){
+		assert(0);
+	}
+	if(a[0].length != 2){
+		assert(0);
+	}
+	if(a[0][0] != 3){
+		assert(0);
+	}
+	if(a[0][1] != 4){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/opCatAssign_21_B.d	Mon Jan 01 16:24:15 2007 +0000
@@ -0,0 +1,29 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bill Baxter <wbaxter@gmail.com>
+// @date@	2006-12-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=748
+// @desc@	[Issue 748] internal error with mixed static / dynamic array
+
+module dstress.run.o.opCatAssign_21_B;
+
+int main(){
+	int[][] a;
+	a ~= [3, 4];
+	if(a.length != 1){
+		assert(0);
+	}
+	if(a[0].length != 2){
+		assert(0);
+	}
+	if(a[0][0] != 3){
+		assert(0);
+	}
+	if(a[0][1] != 4){
+		assert(0);
+	}
+
+	return 0;
+}