diff run/f/foreach_39_C.d @ 1577:45e89f20882a

[Issue 1400] New: static array in struct as parameter BROKEN <default_357-line@yahoo.de> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1400
author thomask
date Thu, 21 Feb 2008 15:20:29 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/foreach_39_C.d	Thu Feb 21 15:20:29 2008 +0000
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<default_357-line@yahoo.de>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1400
+// @desc@	[Issue 1400] New: static array in struct as parameter BROKEN
+
+module dstress.run.f.foreach_39_C;
+
+void test(float[3] t) {
+	if(5.0f != t[0]){
+		assert(0);
+	}
+	if(6.0f != t[1]){
+		assert(0);
+	}
+	if(7.0f != t[2]){
+		assert(0);
+	}
+}
+
+struct E {
+	float[3] data = [5.0f, 6.0f, 7.0f];
+}
+
+int main() {
+	E e;
+	test(e.data);
+
+	return 0;
+}