changeset 656:4706ce8a1287

Manfred Nowak <svv1999@hotmail.com> 2005-08-27 news:deojrd$2h97$2@digitaldaemon.com
author thomask
date Wed, 07 Sep 2005 23:10:15 +0000
parents 4f3505395b1b
children 7bf512caec6a
files run/s/super_12_A.d run/s/super_12_B.d
diffstat 2 files changed, 85 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/super_12_A.d	Wed Sep 07 23:10:15 2005 +0000
@@ -0,0 +1,45 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Manfred Nowak <svv1999@hotmail.com>
+// @date@	2005-08-27
+// @uri@	news:deojrd$2h97$2@digitaldaemon.com
+
+module dstress.run.s.super_12_A;
+
+int statusA;
+int statusB;
+
+class A{
+	class B:A{
+		this(){
+			statusB++;
+			super();
+		}
+	}
+
+	B b;
+
+	this(){
+		statusA++;
+		assert(statusA<100);
+		
+		b = new B;
+	}
+
+}
+
+int main(){
+	try{
+		statusA = 0;
+		statusB = 0;
+		
+		A a = new A;
+	}catch{
+		assert(statusA == 100);
+		assert(statusB == 99);
+		return 0;
+	}
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/super_12_B.d	Wed Sep 07 23:10:15 2005 +0000
@@ -0,0 +1,40 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Manfred Nowak <svv1999@hotmail.com>
+// @date@	2005-08-27
+// @uri@	news:deojrd$2h97$2@digitaldaemon.com
+
+module dstress.run.s.super_12_B;
+
+int statusA;
+int statusB;
+
+class A{
+	class B:A{
+	}
+
+	B b;
+
+	this(){
+		statusA++;
+		assert(statusA<100);
+		
+		b = new B;
+	}
+
+}
+
+int main(){
+	try{
+		statusA = 0;
+		statusB = 0;
+		
+		A a = new A;
+	}catch{
+		assert(statusA == 100);
+		return 0;
+	}
+	assert(0);
+}