# HG changeset patch # User Anders Halager # Date 1216726755 -7200 # Node ID 0e10479623f61f35840413edfbc677a986406110 # Parent 6cb2f4201e2aab7aee1509c532c86eba4ed239f4 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 diff -r 6cb2f4201e2a -r 0e10479623f6 tests/code/sarray_2.d --- a/tests/code/sarray_2.d Tue Jul 22 13:29:20 2008 +0200 +++ b/tests/code/sarray_2.d Tue Jul 22 13:39:15 2008 +0200 @@ -1,8 +1,7 @@ -//fail int main() { int[10] a; - // static array assignment is illegal - we fail for other reasons though + // static array initialization is legal int[10] b = a; } diff -r 6cb2f4201e2a -r 0e10479623f6 tests/code/sarray_3.d --- /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; +} + diff -r 6cb2f4201e2a -r 0e10479623f6 tests/code/sarray_4.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/code/sarray_4.d Tue Jul 22 13:39:15 2008 +0200 @@ -0,0 +1,8 @@ + +int main() +{ + int[10] a; + int[10] b; + b[] = a; +} +