view test/tuple1.d @ 40:8b0e809563df trunk

[svn r44] Lots of bug fixes. New array literal support New array ~= operator support (for single element) New with statement support More...
author lindquist
date Fri, 19 Oct 2007 07:43:21 +0200
parents 8d45266bbabe
children
line wrap: on
line source

module tuple1;

template Tuple(T...) {
    alias T Tuple;
}

struct S
{
    int i;
    long l;
}

void main()
{
    S s = S(Tuple!(1,2L));
    assert(s.i == 1);
    assert(s.l == 2);
}