Mercurial > projects > dstress
view run/sizeof_15.d @ 1330:f3f715978184
Georg Wrede <georg@iki.fi>
2007-01-07
mail:45A120F5.1050108@iki.fi
author | thomask |
---|---|
date | Sat, 13 Jan 2007 10:33:49 +0000 |
parents | 409b666ab312 |
children | b8c0195059d9 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ brad beveridge <brad@nowhere.com> // @date@ 2005-04-25 // @uri@ news:d4ie14$1evb$1@digitaldaemon.com module dstress.run.sizeof_15; size_t res; struct Foo{ float a; } struct Bar{ void test(){ assert((new Foo).a.sizeof==res); } } int main(){ res=Foo.a.sizeof; Bar* b = new Bar; b.test(); return 0; }