changeset 491:f6a24d1475f2

template loop Regan Heath <regan@netwin.co.nz> 2005-03-30 news:opsof4hwgy23k2f5@nrage.netwin.co.nz
author thomask
date Wed, 27 Apr 2005 12:21:18 +0000
parents d091ff903fa4
children e56d6f1cb48e
files nocompile/bug_20050330_A.d run/bug_20050330_B.d
diffstat 2 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/bug_20050330_A.d	Wed Apr 27 12:21:18 2005 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Regan Heath <regan@netwin.co.nz>
+// @date@	2005-03-30
+// @uri@	news:opsof4hwgy23k2f5@nrage.netwin.co.nz
+
+// __DSTRESS_ELINE__ 14
+
+module dstress.nocompile.bug_20050330_A;
+
+template Blah(int a, alias B){
+	mixin Blah!(a, B);
+}
+
+int main(){
+	int a;
+	mixin Blah!(5,a);
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/bug_20050330_B.d	Wed Apr 27 12:21:18 2005 +0000
@@ -0,0 +1,27 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Regan Heath <regan@netwin.co.nz>
+// @date@	2005-03-30
+// @uri@	news:opsof4hwgy23k2f5@nrage.netwin.co.nz
+
+// __DSTRESS_ELINE__ 14
+
+module dstress.run.bug_20050330_B;
+
+template Blah(int a, alias B){
+	mixin Blah!(a-1, alias B);
+}
+
+template Blah(int a:0, alias B){
+	int x(){
+		return a;
+	}
+}
+
+int main(){
+	int a;
+	mixin Blah!(5,a);
+	return 0;
+}