view run/m/mixin_13_B.d @ 1489:b8c0195059d9

changed nntp: URLs to http: URLs
author thomask
date Mon, 09 Apr 2007 13:47:01 +0000
parents 9dcac8d4e97f
children
line wrap: on
line source

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

// @author@	David Friedman <d3rdclsmail_a_@_t_earthlink_d_._t_net>
// @date@	2005-05-04
// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3880

module dstress.run.m.mixin_13_B;

int status;

class C {
	template T(alias f) {
		void check(){
			f();
			assert(status++==2);
		}
	}

	void test(){
		assert(status++==1);
	}

	mixin T!(test) x;

	void run(){
		assert(status++==0);
		check();
		assert(status++==3);
	}
}

int main(){
	C c = new C;
	c.run();
	assert(status==4);
	return 0;
}