view run/t/tuple_20_A.d @ 1609:3c803614a8fb

Add a few missing abstracts.
author Christian Kamm <kamm incasoftware de>
date Sun, 26 Apr 2009 13:38:23 +0200
parents 20d8ee6523e1
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_A;

int x;

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

	void get(ref T t){
		x *= t[0];
	}
}

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

	return 0;
}