Mercurial > projects > dstress
view run/f/forward_reference_20_C.d @ 1586:a74f0139fc3d
Fix tests using typeof on types.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 21 Aug 2008 15:42:21 +0200 |
parents | ca5b18e46ec7 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Bill Baxter <wbaxter@gmail.com> // @date@ 2007-03-12 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1055 // @desc@ [Issue 1055] union forward reference "overlapping initialization" error module dstress.run.f.forward_reference_20_C; struct S{ int y = 0x1234_5678; } struct Z { union { S s; } int x = 0x9ABC_DEF0; } int main(){ Z z; if(0x9ABC_DEF0 != z.x){ assert(0); } if(0x1234_5678 != z.s.y){ assert(0); } return 0; }