diff tests/code/sarray_3.d @ 161:0e10479623f6

Changed the tests for static arrays a little The following code IS legal: int[10] a; int[10] b = a; It's only assignment outside of init thats illegal Also a test for a[] = b, which should compile to a memcpy
author Anders Halager <halager@gmail.com>
date Tue, 22 Jul 2008 13:39:15 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/sarray_3.d	Tue Jul 22 13:39:15 2008 +0200
@@ -0,0 +1,10 @@
+//fail
+int main()
+{
+    int[10] a;
+    // static array initialization is legal
+    int[10] b = a;
+    // static array assignment is illegal
+    b = a;
+}
+