Mercurial > projects > dstress
view run/struct_initialization_03.d @ 9:4d64fb56f885
added struct_initialization tests
author | thomask |
---|---|
date | Wed, 06 Oct 2004 09:37:33 +0000 |
parents | |
children | f87ba6507260 |
line wrap: on
line source
struct MyStruct{ int a; int b; int c = 7; } int main(){ static MyStruct s={c:2}; assert(s.a==int.init); assert(s.b==int.init); assert(s.c==2); return 0; }