view nocompile/m/mixin_19_F.d @ 1618:87a6ab8f478d

Returns of non-void expressions are no longer valid in void functions.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:48:11 +0100
parents 81222734adf3
children
line wrap: on
line source

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

// @author@	<nail-mail@mail.ru>
// @date@	2006-04-04
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=83

// __DSTRESS_ELINE__ 24

module dstress.nocompile.m.mixin_19_F;

int state;

template T1(){
	alias T2!().myproperty myproperty;

	int myproperty(){
		return state;
	}
}

template T2(){
	alias T1!().myproperty myproperty;

	void myproperty(int x){
		state = x;
	}
}

class C(alias M1, alias M2){
	mixin T1!();
	mixin T2!();
}

void main(){
	auto c = new C!(T1, T2)();
	c.myproperty = 3;
}