view run/t/tuple_12_A.d @ 1514:891196dcfc3a

[Issue 1068] stack corruption with mixins and function templates Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> 2007-03-19 http://d.puremagic.com/issues/show_bug.cgi?id=1068
author thomask
date Wed, 25 Apr 2007 17:46:32 +0000
parents f6001af60ca0
children
line wrap: on
line source

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

// @author@	downs <default_357-line@yahoo.de>
// @date@	2006-12-29
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=771
// @desc@	[Issue 771] template func returns delegate w. param list from tuple and type, odd compiler error

module dstress.run.t.tuple_12_A;

template Concat(S, T...){
	void delegate(T, S) Concat(void delegate(T) one, void delegate(S) two) {
		return delegate void(T t, S s){};
	}
}

int main() {
	void delegate(char, char, int) dg;

	dg = Concat(
			delegate void(char a, char b) {},
			delegate void(int lol) {}
		);

	return 0;
}