view run/interface_02.d @ 1330:f3f715978184

Georg Wrede <georg@iki.fi> 2007-01-07 mail:45A120F5.1050108@iki.fi
author thomask
date Sat, 13 Jan 2007 10:33:49 +0000
parents f87ba6507260
children b8c0195059d9
line wrap: on
line source

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

// @author@	van eeshan <vanee@hotmail.com>
// @date@	2004-08-05
// @uri@	news:ces67k$rgj$1@digitaldaemon.com

module dstress.run.interface_02;

int status;

interface Interface1{
	void one();
}

interface Interface2{
	void two();
}

interface Interface3 : Interface1, Interface2{
	void three();
}

class MyClass : Interface3{
	void one(){
		status=1;
	}
	void two(){
		status=20;
	}
	void three(){
		status=300;
	}
}

int main(){
	Interface3 i = new MyClass();
	assert(status==0);
	i.one();
	assert(status==1);
	i.two();
	assert(status==20);
	i.three();
	assert(status==300);
	return 0;
}