view run/t/template_65_D.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 1d41f2132ef4
children
line wrap: on
line source

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

// @author@	<samukha@voliacable.com>
// @date@	2007-09-07
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1532
// @desc@	[Issue 1532] Template instance cannot use class locals as template parameters

module dstress.run.t.template_65_D;

struct S{
	template T(alias local){
		int T(){
			return local;
		}
	}

	int foo(){
			return 0x12_AB_34_EF;
	}

	alias T!(foo) bar;
}

int main(){
	S s;
	if(0x12_AB_34_EF != s.bar()){
		assert(0);
	}
	return 0;
}