changeset 965:d435505c06a0

<benoit@tionex.de> 2006-04-13 news:bug-105-3@http.d.puremagic.com/bugzilla/
author thomask
date Tue, 18 Apr 2006 06:26:38 +0000
parents ff56ed1fd9fd
children 55ca75ff5781
files run/m/mixin_20_A.d run/m/mixin_20_B.d
diffstat 2 files changed, 68 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/m/mixin_20_A.d	Tue Apr 18 06:26:38 2006 +0000
@@ -0,0 +1,34 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<benoit@tionex.de>
+// @date@	2006-04-13
+// @uri@	news:bug-105-3@http.d.puremagic.com/bugzilla/
+
+module dstress.run.m.mixin_20_A;
+
+template T( int i ){
+	int foo(){
+		return i;
+	}
+}
+
+class C {
+	mixin T!( 1 ) a;
+	mixin T!( 2 ) b;
+}
+
+int main(){
+	C c = new C();
+
+	if(c.a.foo() != 1){
+		assert(0);
+	}
+
+	if(c.b.foo() != 2){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/m/mixin_20_B.d	Tue Apr 18 06:26:38 2006 +0000
@@ -0,0 +1,34 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<benoit@tionex.de>
+// @date@	2006-04-13
+// @uri@	news:bug-105-3@http.d.puremagic.com/bugzilla/
+
+module dstress.run.m.mixin_20_A;
+
+template T( int i ){
+	int opCall(){
+		return i;
+	}
+}
+
+class C {
+	mixin T!( 1 ) a;
+	mixin T!( 2 ) b;
+}
+
+int main(){
+	C c = new C();
+
+	if(c.a() != 1){
+		assert(0);
+	}
+
+	if(c.b() != 2){
+		assert(0);
+	}
+
+	return 0;
+}