view run/t/typeof_09_C.d @ 1319:81222734adf3

sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
author thomask
date Sun, 31 Dec 2006 19:58:06 +0000
parents d3f836c7c9e6
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	<oskar.linde@gmail.com>
// @date@	2006-03-16
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=54

module dstress.run.t.typeof_09_C;

typedef int MyInt = 4;

template declare(X){
	X declare;
}

typeof(declare!(MyInt[0])[0]) y;

int main(){
	static if(!is(typeof(y) == MyInt)){
		static assert(0);
	}

	if(y != cast(MyInt)4){
		assert(0);
	}

	return 0;
}