comparison tests/code/sarray_2.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 189c049cbfcc
children
comparison
equal deleted inserted replaced
160:6cb2f4201e2a 161:0e10479623f6
1 //fail
2 int main() 1 int main()
3 { 2 {
4 int[10] a; 3 int[10] a;
5 // static array assignment is illegal - we fail for other reasons though 4 // static array initialization is legal
6 int[10] b = a; 5 int[10] b = a;
7 } 6 }
8 7