view run/f/foreach_38_C.d @ 1597:8b9d4d2f925a

Fix typos in complex tests. See D bug 614.
author Christian Kamm <kamm incasoftware de>
date Tue, 09 Sep 2008 16:53:58 +0200
parents a74f0139fc3d
children
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(a == typeof(C.tupleof)[i]));
	}
}

struct MyStruct1 {
	int afield;
}

struct MyStruct2 {
	real afield;
}

int main(){
	Fields!(MyStruct2);
	return 0;
}