# HG changeset patch # User thomask # Date 1110783981 0 # Node ID 86e4b19bc26b01fec321b1ea194d194407636ce1 # Parent 1a91b18b32609f95d0318b2afed50e8ba7bec82c array init Andrew Fedoniouk 2005-03-10 news:d0otkq$1fsg$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs/3137 diff -r 1a91b18b3260 -r 86e4b19bc26b run/struct_initialization_06.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/struct_initialization_06.d Mon Mar 14 07:06:21 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Andrew Fedoniouk +// @date@ 2005-03-10 +// @uri@ news:d0otkq$1fsg$1@digitaldaemon.com +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/3137 + +module dstress.run.struct_initialization_06; + +struct A { + int one; + int two[4]; +} + +A a = { one:1, two:2 }; + +int main(){ + assert(a.one==1); + assert(a.two[0]==2); + assert(a.two[1]==2); + assert(a.two[2]==2); + assert(a.two[3]==2); + return 0; +}