T[#] can be a type or an array of types

BCS ao at pathlink.com
Tue Jun 3 18:49:55 PDT 2008


not exactly a bug but this is a little weird.


void Foo(alias Tfn)()
{
	Tfn!()[2] x = void;
	pragma(msg,typeof(x).stringof);
	x[0] = Tfn!().init;
}

template Bob() { alias T!(int, uint, char) Bob; }
template Joe() { alias int Joe; }


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

alias Foo!(Bob) fig;
alias Foo!(Joe) fig;

void main(){}




More information about the Digitalmars-d-bugs mailing list