Mercurial > projects > dstress
view run/f/foreach_38_C.d @ 1472:22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
Frits van Bommel <fvbommel@wxs.nl>
2007-02-06
http://d.puremagic.com/issues/show_bug.cgi?id=932
author | thomask |
---|---|
date | Thu, 05 Apr 2007 16:36:53 +0000 |
parents | |
children | a74f0139fc3d |
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_C; 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!(MyStruct2); return 0; }