view run/t/tuple_20_B.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 85bd7d2ddb7d
children
line wrap: on
line source

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

// @author@	Nick <korslund@gmail.com>
// @date@	2007-02-06
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=933
// @desc@	[Issue 933] Literal tuple parameters fails to compile when inout is mentioned

module dstress.run.t.tuple_20_B;

int x;

struct Foo(T...){
	void set(T t){
		x += t[0];
	}
}

int main(){
	Foo!(int) foo;
	foo.set(5);
	if(5 != x){
		assert(0);
	}

	return 0;
}