changeset 1313:f6001af60ca0

[Issue 771] template func returns delegate w. param list from tuple and type, odd compiler error downs <default_357-line@yahoo.de> 2006-12-29 http://d.puremagic.com/issues/show_bug.cgi?id=771
author thomask
date Sun, 31 Dec 2006 14:28:37 +0000
parents eac3a538961a
children 198b48f868e6
files reporter.txt run/t/tuple_12_A.d run/t/tuple_12_B.d
diffstat 3 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/reporter.txt	Sun Dec 31 14:28:27 2006 +0000
+++ b/reporter.txt	Sun Dec 31 14:28:37 2006 +0000
@@ -50,6 +50,7 @@
 Derek Parnell		<ddparnell@bigpond.com>
 dickl			<dick221z@yahoo.com>
 Don Clugston		<clugdbug@yahoo.com.au>
+downs			<default_357-line@yahoo.de>
 ElfQT			<dethjunk@yahoo.com>
 Eric Anderton (aka Pragma)	<ericanderton@yahoo.com>
 Eugene Pelekhay		<pelekhay@gmail.com>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/tuple_12_A.d	Sun Dec 31 14:28:37 2006 +0000
@@ -0,0 +1,27 @@
+// $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;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/tuple_12_B.d	Sun Dec 31 14:28:37 2006 +0000
@@ -0,0 +1,24 @@
+// $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_B;
+
+template Concat(T...){
+	void delegate(T) Concat(void delegate(T) one) {
+		return delegate void(T t){};
+	}
+}
+
+int main() {
+	void delegate(char, char, int) dg;
+
+	dg = Concat(delegate void(char a, char b, int c) {});
+
+	return 0;
+}