Destroy https://issues.dlang.org/show_bug.cgi?id=13291?Andrei
It's worth noting that you can currently do this:
template fun(T)
{
int fun(T val)
{
static if(is(T == string) || is(T == float))
{
return 0;
}
else
{
return 1;
}
}
unittest
{
assert(fun(T.init) == 0);
}
}
void main()
{
fun("test"); //Ok
fun(3.0f); //Ok
fun(1); //AssertError thrown
}
