changeset 579:414368950454

catchup 1/3
author thomask
date Sat, 11 Jun 2005 16:25:27 +0000
parents 978a083bb0d0
children 5e4bd0277f63
files run/c/class_16.d run/o/odd_bug_03_A.d run/o/odd_bug_03_B.d run/o/odd_bug_03_C.d
diffstat 4 files changed, 127 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/class_16.d	Sat Jun 11 16:25:27 2005 +0000
@@ -0,0 +1,27 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @desc@	class inheritance recoursion
+// @author@	Andrew Fedoniouk <news@terrainformatica.com>
+// @date@	2005-06-09
+// @uri@	news:d88kv9$he4$1@digitaldaemon.com
+
+module dstress.run.c.class_16;
+
+class A{
+	class B:A{
+		   const int C = 5;
+	}
+}
+
+int main(){
+	assert(A.B.C==5);
+	assert(A.B.B.C==5);
+	assert(A.B.B.B.C==5);
+	assert(A.B.B.B.B.C==5);
+	assert(A.B.B.B.B.B.C==5);
+	assert(A.B.B.B.B.B.B.C==5);
+	assert(A.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.C*A.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.C==25);
+	return 0;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_03_A.d	Sat Jun 11 16:25:27 2005 +0000
@@ -0,0 +1,36 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @desc@	vararg / char[] / foreach code generation bug
+// @author@	zwang <nehzgnaw@gmail.com>
+// @date@	2005-05-29
+// @uri@	news:d7d2kq$1mc$1@digitaldaemon.com
+
+// @WARNING@ direct use of Phobos
+
+module dstress.run.o.odd_bug_03_A;
+
+import std.format;
+
+const char[] culprit;
+
+void f(...){
+	char[] s;
+
+	void putc(dchar c){
+		s ~= c;       
+	}
+    
+	std.format.doFormat(&putc, _arguments, _argptr);
+    
+	foreach(char ch; s){
+	}
+    
+	assert(s=="mystery");
+}
+
+int main(){
+	f("mystery");
+	return 0;
+} 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_03_B.d	Sat Jun 11 16:25:27 2005 +0000
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @desc@	vararg / char[] / foreach code generation bug
+// @author@	zwang <nehzgnaw@gmail.com>
+// @date@	2005-05-29
+// @uri@	news:d7d2kq$1mc$1@digitaldaemon.com
+
+// @WARNING@ direct use of Phobos
+
+module dstress.run.o.odd_bug_03_B;
+
+import std.format;
+
+const char[] culprit;
+
+void f(...){
+	char[] s;
+
+	void putc(dchar c){
+		s ~= c;       
+	}
+    
+	std.format.doFormat(&putc, _arguments, _argptr);
+    
+	assert(s=="mystery");
+}
+
+int main(){
+	f("mystery");
+	return 0;
+} 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_03_C.d	Sat Jun 11 16:25:27 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @desc@	vararg / char[] / foreach code generation bug
+// @author@	zwang <nehzgnaw@gmail.com>
+// @date@	2005-05-29
+// @uri@	news:d7d2kq$1mc$1@digitaldaemon.com
+
+// @WARNING@ direct use of Phobos
+
+module dstress.run.o.odd_bug_03_C;
+
+import std.format;
+
+void f(...){
+	char[] s;
+
+	void putc(dchar c){
+		s ~= c;       
+	}
+    
+	std.format.doFormat(&putc, _arguments, _argptr);
+    
+	assert(s=="mystery");
+}
+
+int main(){
+	f("mystery");
+	return 0;
+} 
\ No newline at end of file