Mercurial > projects > dstress
view run/f/foreach_38_A.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | 22767ec83a24 |
children | 709f6451b315 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Frits van Bommel <fvbommel@wxs.nl> // @date@ 2007-02-06 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=932 // @desc@ [Issue 932] static foreach in second template instantiation uses wrong tupleof module dstress.run.f.foreach_38_A; void Fields(C)(){ foreach(i, a; typeof(C.tupleof)){ static assert(is(typeof(a) == typeof(C.tupleof)[i])); } } struct MyStruct1 { int afield; } struct MyStruct2 { real afield; } int main(){ Fields!(MyStruct1); Fields!(MyStruct2); return 0; }