view run/t/typedef_08_C.d @ 543:4b941e2f6d4f

typedef & class members Mizuno Hiroki <hiroki1124@hotmail.com> 2005-05-16 news:d6ac08$1uug$1@digitaldaemon.com
author thomask
date Tue, 17 May 2005 15:26:54 +0000
parents
children b8c0195059d9
line wrap: on
line source

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

// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
// @date@	2005-05-16
// @uri@	news:d6ac08$1uug$1@digitaldaemon.com

module dstress.run.t.typedef_08_C;

union Org{
	int x;
	static int stat(int i){
		return i*3;
	}	
}

typedef Org Ali;

int main(){
	Ali a;

	assert(a.stat(3)==9);
	assert(Ali.stat(4)==12);
	assert(Org.stat(5)==15);
	
	return 0;
}