Is this a bug? `static if` fails silently.

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 4 01:00:11 PST 2014


struct Test(T)
{
	static if (is(typeof(T) == int))
	{
		pragma(msg, "test");
		
		this(T t)
		{
			this.t = t;
		}
	}
}

void main()
{
         //Nothing is printed
	Test!int t;
}

Didn't this code used to failed at the point of `typeof(T)`? Has 
this changed since previous releases?


More information about the Digitalmars-d mailing list