comparison tests/mini/tuplestruct.d @ 1132:76e72fdef04d

Fix tuple declarations in aggregates.
author Christian Kamm <kamm incasoftware de>
date Mon, 23 Mar 2009 14:47:51 +0100
parents
children 8ebbad15fc99
comparison
equal deleted inserted replaced
1131:f2f13f111e2e 1132:76e72fdef04d
1 struct V(T...) {
2 T v;
3 }
4
5 alias V!(Object, int) MyV;
6
7 void main()
8 {
9 assert(MyV.sizeof == Object.sizeof + int.sizeof);
10 auto o = new Object;
11 auto v = MyV(o, 3);
12 assert(v.v[0] is o);
13 assert(v.v[1] == 3);
14 }
15