changeset 1068:d892c90166f0

<h3r3tic@mat.uni.torun.pl> 2006-06-22 news:bug-216-3@http.d.puremagic.com/issues/
author thomask
date Mon, 03 Jul 2006 04:00:41 +0000
parents e293e1b6aaaa
children eb15e24d4606
files run/t/template_36_A.d run/t/template_36_B.d run/t/template_36_C.d run/t/template_36_D.d
diffstat 4 files changed, 210 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_36_A.d	Mon Jul 03 04:00:41 2006 +0000
@@ -0,0 +1,52 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<h3r3tic@mat.uni.torun.pl>
+// @date@	2006-06-22
+// @uri@	news:bug-216-3@http.d.puremagic.com/issues/
+
+module dstress.run.t.template_36_A;
+
+int status;
+
+struct S{
+	int i;
+}
+
+template t(){
+	template foo(){
+		void foo(S s){
+			status = s.i + 1;
+		}
+	}
+
+	void bar(S s){
+		foo!()(s);
+	}
+}
+
+
+class Parent {
+}
+
+
+class Child : Parent {
+	mixin t!() mixed;
+}
+
+int main(){
+	Child c = new Child();
+
+	S s;
+	s.i = 3;
+
+	c.mixed.bar(s);
+
+	if(status != 4){
+		assert(0);
+	}
+
+	return 0;
+}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_36_B.d	Mon Jul 03 04:00:41 2006 +0000
@@ -0,0 +1,54 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<h3r3tic@mat.uni.torun.pl>
+// @date@	2006-06-22
+// @uri@	news:bug-216-3@http.d.puremagic.com/issues/
+
+module dstress.run.t.template_36_B;
+
+int status;
+
+struct S{
+	int i;
+}
+
+template t(){
+	template foo(){
+		void foo(S s){
+			status = s.i + 1;
+		}
+	}
+
+	void bar(S s){
+		foo!()(s);
+	}
+}
+
+
+class Parent {
+	this() {
+	}
+}
+
+
+class Child : Parent {
+	mixin t!() mixed;
+}
+
+int main(){
+	Child c = new Child();
+
+	S s;
+	s.i = 3;
+
+	c.mixed.bar(s);
+
+	if(status != 4){
+		assert(0);
+	}
+
+	return 0;
+}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_36_C.d	Mon Jul 03 04:00:41 2006 +0000
@@ -0,0 +1,51 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<h3r3tic@mat.uni.torun.pl>
+// @date@	2006-06-22
+// @uri@	news:bug-216-3@http.d.puremagic.com/issues/
+
+module dstress.run.t.template_36_C;
+
+int status;
+
+struct S{
+	int i;
+}
+
+template t(){
+	template foo(){
+		void foo(S s){
+			status = s.i + 1;
+		}
+	}
+
+	void bar(S s){
+		foo!()(s);
+	}
+}
+
+
+class Child {
+	this() {
+	}
+
+	mixin t!() mixed;
+}
+
+int main(){
+	Child c = new Child();
+
+	S s;
+	s.i = 3;
+
+	c.mixed.bar(s);
+
+	if(status != 4){
+		assert(0);
+	}
+
+	return 0;
+}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_36_D.d	Mon Jul 03 04:00:41 2006 +0000
@@ -0,0 +1,53 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<h3r3tic@mat.uni.torun.pl>
+// @date@	2006-06-22
+// @uri@	news:bug-216-3@http.d.puremagic.com/issues/
+
+module dstress.run.t.template_36_D;
+
+int status;
+
+struct S{
+	int i;
+}
+
+template t(){
+	template foo(){
+		void foo(S s){
+			status = s.i + 1;
+		}
+	}
+
+	void bar(S s){
+		foo!()(s);
+	}
+}
+
+
+class Parent {
+	mixin t!() mixed;
+}
+
+class Child : Parent {
+	this() {
+	}
+}
+
+int main(){
+	Child c = new Child();
+
+	S s;
+	s.i = 3;
+
+	c.mixed.bar(s);
+
+	if(status != 4){
+		assert(0);
+	}
+
+	return 0;
+}
+