Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/mini/tuplestruct.d Mon Mar 23 14:47:51 2009 +0100 @@ -0,0 +1,15 @@ +struct V(T...) { + T v; +} + +alias V!(Object, int) MyV; + +void main() +{ + assert(MyV.sizeof == Object.sizeof + int.sizeof); + auto o = new Object; + auto v = MyV(o, 3); + assert(v.v[0] is o); + assert(v.v[1] == 3); +} +