changeset 1056:135a2746dee3

Bruno Medeiros <brunodomedeirosATgmail@SPAM.com> 2006-06-24 news:e7hus2$1egl$1@digitaldaemon.com
author thomask
date Thu, 29 Jun 2006 13:26:02 +0000
parents 6735097a9cc6
children d90888cdcaca
files run/b/bug_mtype_2226_A.d run/b/bug_mtype_2226_B.d
diffstat 2 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_mtype_2226_A.d	Thu Jun 29 13:26:02 2006 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bruno Medeiros <brunodomedeirosATgmail@SPAM.com>
+// @date@	2006-06-24
+// @uri@	news:e7hus2$1egl$1@digitaldaemon.com
+
+module dstress.run.b.bug_mtype_2226_A;
+
+int status;
+
+class C{
+	void bar(){
+		status++;
+	}
+}
+
+int main(){
+	typeof( {} ) foo;
+	
+	C c = new C();
+
+	foo = &c.bar;
+
+	if(status != 0){
+		assert(0);
+	}
+	foo();
+	if(status != 1){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_mtype_2226_B.d	Thu Jun 29 13:26:02 2006 +0000
@@ -0,0 +1,39 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bruno Medeiros <brunodomedeirosATgmail@SPAM.com>
+// @date@	2006-06-24
+// @uri@	news:e7hus2$1egl$1@digitaldaemon.com
+
+module dstress.run.b.bug_mtype_2226_B;
+
+int status;
+
+class C{
+	void bar(){
+		status++;
+	}
+}
+
+template foo(){
+	typeof( {} ) foo;
+}
+
+int main(){
+	mixin foo!();
+	
+	C c = new C();
+
+	foo = &c.bar;
+
+	if(status != 0){
+		assert(0);
+	}
+	foo();
+	if(status != 1){
+		assert(0);
+	}
+
+	return 0;
+}