Mercurial > projects > dstress
changeset 534:5068f863e9c2
non-constant expression _init_...
Andrew Fedoniouk <news@terrainformatica.com>
2005-05-13
news:d63bn0$11v$1@digitaldaemon.com
author | thomask |
---|---|
date | Sat, 14 May 2005 05:23:21 +0000 |
parents | c8f0ffd00273 |
children | 0db095345640 |
files | run/a/array_initialization_15.d |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/array_initialization_15.d Sat May 14 05:23:21 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Andrew Fedoniouk <news@terrainformatica.com> +// @date@ 2005-05-13 +// @uri@ news:d63bn0$11v$1@digitaldaemon.com + +module dstress.run.a.array_initialization_15; + +struct S{ + int i=1; +} + +static S[3] s= [ 1: { 2 } ]; + +int main(){ + assert(s[0].i==1); + assert(s[1].i==2); + assert(s[2].i==1); + return 0; +}