Mercurial > projects > dstress
view run/s/struct_initialization_12_D.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
parents | d40d75fcd5c5 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Matti Niemenmaa <deewiant@gmail.com> // @date@ 2007-06-15 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1268 // @desc@ [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly module dstress.run.s.struct_initialization_12_D; typedef int I = 13; struct S{ I[5] x; } int main(){ S s = S(); for(size_t i = 0; i < 5; i++){ if(13 != s.x[i]){ assert(0); } } return 0; }