changeset 844:e3c9f22bff58

C# and C++ porting
author thomask
date Fri, 17 Feb 2006 10:14:12 +0000
parents 79b8a1e5c2d0
children 90182df8fe6c
files nocompile/c/class_21_A.d nocompile/c/class_21_B.d nocompile/d/define_01.d nocompile/e/elif_01.d nocompile/e/else_03.d nocompile/e/end_01_A.d nocompile/e/end_01_B.d nocompile/e/endif_01.d nocompile/e/error_01_A.d nocompile/e/error_01_B.d nocompile/e/explicit_01.d nocompile/f/fixed_01.d nocompile/i/if_09.d nocompile/i/implicit_01.d nocompile/o/obsolete_01_A.d nocompile/o/obsolete_01_B.d nocompile/o/obsolete_01_C.d nocompile/o/obsolete_01_D.d nocompile/p/private_10_I.d nocompile/p/private_10_J.d nocompile/p/private_10_K.d nocompile/p/private_10_L.d nocompile/r/region_01_A.d nocompile/r/region_01_B.d nocompile/s/stackalloc_01_A.d nocompile/s/stackalloc_01_B.d nocompile/s/stackalloc_01_C.d nocompile/s/stackalloc_01_D.d nocompile/s/stackalloc_01_E.d nocompile/s/struct_24.d nocompile/try_05.d nocompile/u/undef_01.d nocompile/w/warning_01_A.d nocompile/w/warning_01_B.d
diffstat 34 files changed, 454 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/c/class_21_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 20
+
+module dstress.nocompile.c.class_21_A;
+
+class C{
+	int i;	
+}
+
+void main(){
+	C c = new C();
+
+	int x;
+
+	x = c->i;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/c/class_21_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 20
+
+module dstress.nocompile.c.class_21_B;
+
+class C{
+	int i;	
+}
+
+void main(){
+	C* c = &(new C());
+
+	int x;
+
+	x = c->i;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/d/define_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.d.define_01;
+
+#define A 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/elif_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.elif_01;
+
+#elif 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/else_03.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.else_03;
+
+#else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/end_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.end_01_A;
+
+#end "A"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/end_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.end_01_B;
+
+#end A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/endif_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.endif_01;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/error_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.error_01_A;
+
+#error ha
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/error_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.error_01_B;
+
+#error "ha"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/e/explicit_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.explicit_01;
+
+public static explicit operator int(float f){
+	return 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/f/fixed_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,17 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 14
+
+module dstress.nocompile.f.fixed_01;
+
+void main(){
+	int i = 3;
+
+	fixed(int* ptr = i){
+		(*ptr)++;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/i/if_09.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,12 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.e.else_09;
+
+#if 1
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/i/implicit_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.i.implicit_01;
+
+public static implicit operator int(float f){
+	return 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/o/obsolete_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.o.obsolete_01_A;
+
+[Obsolete("use some other class")]
+class X{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/o/obsolete_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.o.obsolete_01_B;
+
+Obsolete("use some other class")
+class X{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/o/obsolete_01_C.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.o.obsolete_01_C;
+
+obsolete("use some other class")
+class X{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/o/obsolete_01_D.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.o.obsolete_01_D;
+
+[obsolete("use some other class")]
+class X{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/p/private_10_I.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	bobef <bobef@lessequal.com>
+// @date@	2006-01-11
+// @uri@	news:dsk9hb$ugh$1@digitaldaemon.com
+
+// __DSTRESS_ELINE__ 17
+
+module dstress.nocompile.p.private_10_I;
+
+import addon.private_10_Z;
+
+
+void main(){
+	int i = foo(1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/p/private_10_J.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	bobef <bobef@lessequal.com>
+// @date@	2006-01-11
+// @uri@	news:dsk9hb$ugh$1@digitaldaemon.com
+
+// __DSTRESS_ELINE__ 17
+
+module dstress.nocompile.p.private_10_J;
+
+import addon.private_10_Z;
+
+
+void main(){
+	int i = test();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/p/private_10_K.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	bobef <bobef@lessequal.com>
+// @date@	2006-01-11
+// @uri@	news:dsk9hb$ugh$1@digitaldaemon.com
+
+// __DSTRESS_ELINE__ 17
+
+module dstress.nocompile.p.private_10_K;
+
+import addon.private_10_Z;
+
+
+void main(){
+	int i = bar(1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/p/private_10_L.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	bobef <bobef@lessequal.com>
+// @date@	2006-01-11
+// @uri@	news:dsk9hb$ugh$1@digitaldaemon.com
+
+// __DSTRESS_ELINE__ 17
+
+module dstress.nocompile.p.private_10_L;
+
+import addon.private_10_Z;
+
+
+void main(){
+	int i = check();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/r/region_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,12 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.r.region_01_A;
+
+#region A
+#end A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/r/region_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,12 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.r.region_01_B;
+
+#region "A"
+#end "A"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/stackalloc_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 12
+
+module dstress.nocompile.s.stackalloc_01_A;
+
+void main(){
+	int* a = int[10];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/stackalloc_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 12
+
+module dstress.nocompile.s.stackalloc_01_B;
+
+void main(){
+	int[] a = stackalloc new int[10];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/stackalloc_01_C.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 12
+
+module dstress.nocompile.s.stackalloc_01_C;
+
+void main(){
+	int[] a = new stackalloc int[10];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/stackalloc_01_D.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 12
+
+module dstress.nocompile.s.stackalloc_01_D;
+
+void main(){
+	int* a = new stackalloc int[10];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/stackalloc_01_E.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,13 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C#
+
+// __DSTRESS_ELINE__ 12
+
+module dstress.nocompile.s.stackalloc_01_E;
+
+void main(){
+	int* a = stackalloc new int[10];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/s/struct_24.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 20
+
+module dstress.nocompile.s.struct_24;
+
+struct S{
+	int i;	
+}
+
+void main(){
+	S* s = new S();
+
+	int x;
+
+	x = s->i;
+}
--- a/nocompile/try_05.d	Fri Feb 17 10:13:19 2006 +0000
+++ b/nocompile/try_05.d	Fri Feb 17 10:14:12 2006 +0000
@@ -17,9 +17,9 @@
 int main(){
 	try{
 		throw new MyException("");
-	}catch(Exception){
+	}catch(Exception e1){
 		assert(0);
-	}catch(MyException){
+	}catch(MyException e2){
 		assert(1);
 	}
 	return 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/u/undef_01.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.u.undef_01;
+
+#undef A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/w/warning_01_A.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.w.warning_01_A;
+
+#warning ha
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/w/warning_01_B.d	Fri Feb 17 10:14:12 2006 +0000
@@ -0,0 +1,11 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// Porting: C++
+
+// __DSTRESS_ELINE__ 11
+
+module dstress.nocompile.w.warning_01_B;
+
+#warning "ha"