view run/m/mixin_26_B.d @ 1338:54d2cf6154ba

[Issue 873] Scope dependant compilation error Boris Kolar <boris.kolar@globera.com> 2007-01-23 http://d.puremagic.com/issues/show_bug.cgi?id=873
author thomask
date Tue, 23 Jan 2007 13:46:14 +0000
parents
children
line wrap: on
line source

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

// @author@	Boris Kolar <boris.kolar@globera.com>
// @date@	2007-01-23
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=873
// @desc@	[Issue 873] Scope dependant compilation error

module dstress.run.m.mixin_26_B;

template Factory() {
	Foo bar() {
		return Foo.init;
	}
}

int main() {
	struct Foo {
		mixin Factory!();
		int i = 0x12_34_FF_AA;
	}

	Foo f;
	if(f.bar() != Foo.init){
		assert(0);
	}

	if(f.bar().i == 0x12_34_FF_AA){
		return 0;
	}
}